summaryrefslogtreecommitdiff
path: root/bcc32
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-07 16:26:48 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-07 16:26:48 +0000
commitefa1e84e252842ac0b1dc4c78f4f6c6177e63604 (patch)
tree304bbc176eb064f324da79b8bb204008cba0cb2f /bcc32
parentae2dd3bd11b1c3252fdccf30617b19b59029ede9 (diff)
merge revision(s) 13688:
* {bcc,win}32/mkexports.rb: explicit data. [ruby-list:44108] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@16887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bcc32')
-rw-r--r--bcc32/mkexports.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/bcc32/mkexports.rb b/bcc32/mkexports.rb
index e34b441..d24efe4 100644
--- a/bcc32/mkexports.rb
+++ b/bcc32/mkexports.rb
@@ -5,7 +5,7 @@ STDIN.reopen(open("nul"))
ARGV.each do |obj|
IO.foreach("|tdump -q -oiPUBDEF -oiPUBD32 #{obj.tr('/', '\\')}") do |l|
next unless /(?:PUBDEF|PUBD32)/ =~ l
- SYM[$1] = true if /'(.*?)'/ =~ l
+ SYM[$1] = !$2 if /'(.*?)'\s+Segment:\s+_(TEXT)?/ =~ l
end
end
@@ -16,7 +16,10 @@ elsif $library
exports << "Library " + $library
end
exports << "Description " + $description.dump if $description
-exports << "EXPORTS" << SYM.keys.sort
+exports << "EXPORTS"
+SYM.sort.each do |sym, is_data|
+ exports << (is_data ? "#{sym} DATA" : sym)
+end
if $output
open($output, 'w') {|f| f.puts exports.join("\n")}