summaryrefslogtreecommitdiff
path: root/win32/mkexports.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-23 07:05:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-23 07:05:23 +0000
commit556515bf69a098c146b7856395a0e804e9159115 (patch)
tree45f6368183ace58d46e8f1faeac592e525cac0cf /win32/mkexports.rb
parent0eb1ac5b392b082606b3a658fbc2cc7eaf76e0d3 (diff)
Makefile.in: make static IDs symbols local
* Makefile.in (LIBRUBY_SO): make symbols for static IDs which begin with ruby_static_id_ local too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/mkexports.rb')
-rwxr-xr-xwin32/mkexports.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/win32/mkexports.rb b/win32/mkexports.rb
index ab29fc1..c3514f1 100755
--- a/win32/mkexports.rb
+++ b/win32/mkexports.rb
@@ -7,6 +7,8 @@ module RbConfig
end
class Exports
+ PrivateNames = /(?:Init_|ruby_static_id_|.*_threadptr_|DllMain\b)/
+
@@subclass = []
def self.inherited(klass)
@@subclass << [/#{klass.name.sub(/.*::/, '').downcase}/i, klass]
@@ -116,7 +118,7 @@ class Exports::Mswin < Exports
is_data = !$1
if noprefix or /^[@_]/ =~ l
next if /(?!^)@.*@/ =~ l || /@[[:xdigit:]]{8,32}$/ =~ l ||
- /^_?(?:Init_|.*_threadptr_|DllMain\b)/ =~ l
+ /^_?#{PrivateNames}/o =~ l
l.sub!(/^[@_]/, '') if /@\d+$/ !~ l
elsif !l.sub!(/^(\S+) \([^@?\`\']*\)$/, '\1')
next
@@ -150,7 +152,7 @@ class Exports::Cygwin < Exports
def each_export(objs)
symprefix = RbConfig::CONFIG["SYMBOL_PREFIX"]
symprefix.strip! if symprefix
- re = /\s(?:(T)|[[:upper:]])\s#{symprefix}((?!Init_|.*_threadptr_|DllMain\b).*)$/
+ re = /\s(?:(T)|[[:upper:]])\s#{symprefix}((?!#{PrivateNames}).*)$/
objdump(objs) do |l|
next if /@.*@/ =~ l
yield $2, !$1 if re =~ l