aboutsummaryrefslogtreecommitdiffstats
path: root/win32/mkexports.rb
diff options
context:
space:
mode:
Diffstat (limited to 'win32/mkexports.rb')
-rwxr-xr-xwin32/mkexports.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/win32/mkexports.rb b/win32/mkexports.rb
index f6d40f8cfb..06f8c8ddbb 100755
--- a/win32/mkexports.rb
+++ b/win32/mkexports.rb
@@ -143,9 +143,12 @@ class Exports::Cygwin < Exports
end
def each_export(objs)
+ symprefix = RbConfig::CONFIG["SYMBOL_PREFIX"]
+ symprefix.strip! if symprefix
+ re = /\s(?:(T)|[[:upper:]])\s#{symprefix}((?!Init_|.*_threadptr_|DllMain@).*)$/
objdump(objs) do |l|
next if /@.*@/ =~ l
- yield $2, !$1 if /\s(?:(T)|[[:upper:]])\s_((?!Init_|.*_threadptr_|DllMain@).*)$/ =~ l
+ yield $2, !$1 if re =~ l
end
end
end