From 556515bf69a098c146b7856395a0e804e9159115 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 23 Feb 2015 07:05:23 +0000 Subject: 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 --- win32/mkexports.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'win32') diff --git a/win32/mkexports.rb b/win32/mkexports.rb index ab29fc1cfa..c3514f13ab 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 -- cgit v1.2.3