File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 5
5
ARGV . each do |obj |
6
6
IO . foreach ( "|tdump -q -oiPUBDEF -oiPUBD32 #{ obj . tr ( '/' , '\\' ) } " ) do |l |
7
7
next unless /(?:PUBDEF|PUBD32)/ =~ l
8
- SYM [ $1] = true if /'(.*?)'/ =~ l
8
+ SYM [ $1] = !$2 if /'(.*?)'\s +Segment: \s +_(TEXT)? / =~ l
9
9
end
10
10
end
11
11
16
16
exports << "Library " + $library
17
17
end
18
18
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
20
23
21
24
if $output
22
25
open ( $output, 'w' ) { |f | f . puts exports . join ( "\n " ) }
Original file line number Diff line number Diff line change 2
2
#define RUBY_RELEASE_DATE "2008-06-08"
3
3
#define RUBY_VERSION_CODE 185
4
4
#define RUBY_RELEASE_CODE 20080608
5
- #define RUBY_PATCHLEVEL 132
5
+ #define RUBY_PATCHLEVEL 133
6
6
7
7
#define RUBY_VERSION_MAJOR 1
8
8
#define RUBY_VERSION_MINOR 8
Original file line number Diff line number Diff line change 5
5
objs = ARGV . collect { |s | s . tr ( '/' , '\\' ) }
6
6
IO . foreach ( "|dumpbin -symbols " + objs . join ( ' ' ) ) do |l |
7
7
next if /^[0-9A-F]+ 0+ UNDEF / =~ l
8
- next unless l . sub! ( /.*\s External\s +\| \s +/ , '' )
8
+ next unless l . sub! ( /.*?\s (\( \) \s +)?External\s +\| \s +/ , "" )
9
+ is_data = !$1
9
10
if l . sub! ( /^_/ , '' )
10
11
next if /@.*@/ =~ l || /@[0-9a-f]{16}$/ =~ l
11
12
elsif !l . sub! ( /^(\S +) \( [^@?\` \' ]*\) $/ , '\1' )
12
13
next
13
14
end
14
- SYM [ l . strip ] = true
15
+ SYM [ l . strip ] = is_data
15
16
end
16
17
17
18
exports = [ ]
21
22
exports << "Library " + $library
22
23
end
23
24
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
25
29
26
30
if $output
27
31
open ( $output, 'w' ) { |f | f . puts exports . join ( "\n " ) }
You can’t perform that action at this time.
0 commit comments