|
@@ -17,14 +17,18 @@ while ( <> ) {
|
17
|
17
|
print;
|
18
|
18
|
( my $index, my $section ) = ( $1, $2 );
|
19
|
19
|
$section_idx{$section} = sprintf ( "%02d", $index );
|
20
|
|
- } elsif ( /^([0-9a-fA-F]+)\s.*?\s([\.\*]\S+)\s+([0-9a-fA-F]+)\s/ ) {
|
|
20
|
+ } elsif ( /^([0-9a-fA-F]+)\s.*?\s([\.\*]\S+)\s+([0-9a-fA-F]+)\s+(\S+)/ ) {
|
21
|
21
|
# It's a symbol line - store it in the hash, indexed by
|
22
|
|
- # "<section index>:<value>:<size>"
|
23
|
|
- ( my $value, my $section, my $size ) = ( $1, $2, $3 );
|
|
22
|
+ # "<section_index>:<value>:<size>:<end_tag>". <end_tag> is "0" if
|
|
23
|
+ # the symbol name is of the form xxx_end, "1" otherwise; this is
|
|
24
|
+ # done so that table end markers show up before any other symbols
|
|
25
|
+ # with the same value.
|
|
26
|
+ ( my $value, my $section, my $size, my $name ) = ( $1, $2, $3, $4 );
|
24
|
27
|
die "Unrecognised section \"$section\"\n"
|
25
|
28
|
unless exists $section_idx{$section};
|
26
|
29
|
my $section_idx = $section_idx{$section};
|
27
|
|
- my $key = $section_idx.":".$value.":".$size;
|
|
30
|
+ my $end = ( $name =~ /_end$/ ) ? "0" : "1";
|
|
31
|
+ my $key = $section_idx.":".$value.":".$size.":".$end;
|
28
|
32
|
$lines{$key} ||= '';
|
29
|
33
|
$lines{$key} .= $_;
|
30
|
34
|
} else {
|