Skip to content

Commit efa1e84

Browse files
committed
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
1 parent ae2dd3b commit efa1e84

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

bcc32/mkexports.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
ARGV.each do |obj|
66
IO.foreach("|tdump -q -oiPUBDEF -oiPUBD32 #{obj.tr('/', '\\')}") do |l|
77
next unless /(?:PUBDEF|PUBD32)/ =~ l
8-
SYM[$1] = true if /'(.*?)'/ =~ l
8+
SYM[$1] = !$2 if /'(.*?)'\s+Segment:\s+_(TEXT)?/ =~ l
99
end
1010
end
1111

@@ -16,7 +16,10 @@
1616
exports << "Library " + $library
1717
end
1818
exports << "Description " + $description.dump if $description
19-
exports << "EXPORTS" << SYM.keys.sort
19+
exports << "EXPORTS"
20+
SYM.sort.each do |sym, is_data|
21+
exports << (is_data ? "#{sym} DATA" : sym)
22+
end
2023

2124
if $output
2225
open($output, 'w') {|f| f.puts exports.join("\n")}

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define RUBY_RELEASE_DATE "2008-06-08"
33
#define RUBY_VERSION_CODE 185
44
#define RUBY_RELEASE_CODE 20080608
5-
#define RUBY_PATCHLEVEL 132
5+
#define RUBY_PATCHLEVEL 133
66

77
#define RUBY_VERSION_MAJOR 1
88
#define RUBY_VERSION_MINOR 8

win32/mkexports.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
objs = ARGV.collect {|s| s.tr('/', '\\')}
66
IO.foreach("|dumpbin -symbols " + objs.join(' ')) do |l|
77
next if /^[0-9A-F]+ 0+ UNDEF / =~ l
8-
next unless l.sub!(/.*\sExternal\s+\|\s+/, '')
8+
next unless l.sub!(/.*?\s(\(\)\s+)?External\s+\|\s+/, "")
9+
is_data = !$1
910
if l.sub!(/^_/, '')
1011
next if /@.*@/ =~ l || /@[0-9a-f]{16}$/ =~ l
1112
elsif !l.sub!(/^(\S+) \([^@?\`\']*\)$/, '\1')
1213
next
1314
end
14-
SYM[l.strip] = true
15+
SYM[l.strip] = is_data
1516
end
1617

1718
exports = []
@@ -21,7 +22,10 @@
2122
exports << "Library " + $library
2223
end
2324
exports << "Description " + $description.dump if $description
24-
exports << "EXPORTS" << SYM.keys.sort
25+
exports << "EXPORTS"
26+
SYM.sort.each do |sym, is_data|
27+
exports << (is_data ? "#{sym} DATA" : sym)
28+
end
2529

2630
if $output
2731
open($output, 'w') {|f| f.puts exports.join("\n")}

0 commit comments

Comments
 (0)