From efa1e84e252842ac0b1dc4c78f4f6c6177e63604 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Sat, 7 Jun 2008 16:26:48 +0000 Subject: 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 --- bcc32/mkexports.rb | 7 +++++-- version.h | 2 +- win32/mkexports.rb | 10 +++++++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/bcc32/mkexports.rb b/bcc32/mkexports.rb index e34b441e2f..d24efe4da4 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")} diff --git a/version.h b/version.h index 48c7a94824..d4f592c203 100644 --- a/version.h +++ b/version.h @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2008-06-08" #define RUBY_VERSION_CODE 185 #define RUBY_RELEASE_CODE 20080608 -#define RUBY_PATCHLEVEL 132 +#define RUBY_PATCHLEVEL 133 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 diff --git a/win32/mkexports.rb b/win32/mkexports.rb index 3859381935..72b3b95d1c 100644 --- a/win32/mkexports.rb +++ b/win32/mkexports.rb @@ -5,13 +5,14 @@ SYM = {} objs = ARGV.collect {|s| s.tr('/', '\\')} IO.foreach("|dumpbin -symbols " + objs.join(' ')) do |l| next if /^[0-9A-F]+ 0+ UNDEF / =~ l - next unless l.sub!(/.*\sExternal\s+\|\s+/, '') + next unless l.sub!(/.*?\s(\(\)\s+)?External\s+\|\s+/, "") + is_data = !$1 if l.sub!(/^_/, '') next if /@.*@/ =~ l || /@[0-9a-f]{16}$/ =~ l elsif !l.sub!(/^(\S+) \([^@?\`\']*\)$/, '\1') next end - SYM[l.strip] = true + SYM[l.strip] = is_data end exports = [] @@ -21,7 +22,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")} -- cgit v1.2.3