summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-10-13 00:02:20 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-10-13 00:02:20 +0000
commitfc3e0bd5625c6869c9eae63179d37da207f8de30 (patch)
tree8e1498f09232361754d10c29fcc41a8eceb9f461
parent9f99bc463176fa2b0244b20af5eeb82b50eb3405 (diff)
* {bcc,win}32/mkexports.rb: explicit data. [ruby-list:44108]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rwxr-xr-xbcc32/mkexports.rb2
-rwxr-xr-xwin32/mkexports.rb7
3 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index bccbdc47ab..be38697385 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sat Oct 13 09:02:16 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * {bcc,win}32/mkexports.rb: explicit data. [ruby-list:44108]
+
Sat Oct 13 00:17:49 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/rexml/document.rb (REXML::Document::write): leaky
diff --git a/bcc32/mkexports.rb b/bcc32/mkexports.rb
index 1b498f8515..965a09b827 100755
--- a/bcc32/mkexports.rb
+++ b/bcc32/mkexports.rb
@@ -15,7 +15,7 @@ class Exports::Bcc < Exports
opt = /\.(?:so|dll)\z/i =~ obj ? "-ee" : "-oiPUBDEF -oiPUBD32"
IO.foreach("|tdump -q #{opt} #{obj.tr('/', '\\')} < nul") do |l|
next unless /(?:PUBDEF|PUBD32|EXPORT)/ =~ l
- yield $1 if /'(.*?)'/ =~ l
+ yield $1, !$2 /'(.*?)'\s+Segment:\s+_(TEXT)?/ =~ l
end
end
yield "_strcasecmp", "_stricmp"
diff --git a/win32/mkexports.rb b/win32/mkexports.rb
index 53a4a89c2d..e9a81345de 100755
--- a/win32/mkexports.rb
+++ b/win32/mkexports.rb
@@ -75,7 +75,7 @@ class Exports
end
def symbols()
- @syms.sort.collect {|k, v| v ? "#{k}=#{v}" : k}
+ @syms.sort.collect {|k, v| v ? v == true ? "#{k} DATA" : "#{k}=#{v}" : k}
end
end
@@ -90,7 +90,8 @@ class Exports::Mswin < Exports
case filetype
when /OBJECT/, /LIBRARY/
next if /^[[:xdigit:]]+ 0+ UNDEF / =~ l
- next unless l.sub!(/.*\sExternal\s+\|\s+/, '')
+ next unless l.sub!(/.*?\s(\(\)\s+)?External\s+\|\s+/, '')
+ is_data = !$1
if noprefix or l.sub!(/^_/, '')
next if /@.*@/ =~ l || /@[[:xdigit:]]{16}$/ =~ l
l.sub!(/^/, '_') if /@\d+$/ =~ l
@@ -102,7 +103,7 @@ class Exports::Mswin < Exports
else
next
end
- yield l.strip
+ yield l.strip, is_data
end
end
end