[PATCH] [2nd try] Show AIX gc'd symbol address adjustments in map file
Douglas B Rupp
rupp@adacore.com
Wed May 13 17:03:05 GMT 2020
On 5/12/20 5:05 PM, Alan Modra via Binutils wrote:
> This line should then be something like
> if (discarded_section (sec))
This test was not revealing for a discarded symbol, it always came up as
false in my testing.
Fyi: I'm using an old version of binutils (2.23.52.20130704) for testing
(ultimately this is for a customer of ours who is required to use this
version due to certification requirements). That's not your problem of
course, but I'm just mentioning it in case there's a version issue in
play here.
My understanding of garbage collection is limited, but it seems to me
that gc'd symbols and gc'd sections are apples and oranges, so I don't
see how it will be possible to use a discarded section test.
> or perhaps better, rather than using the bfd macro use the same
> condition as in lang_map for config.print_map_discarded, to determine
> discarded sections. I'm presuming that those conditions actually work
> for your "AIX XCOFF garbage collected symbols". Maybe they won't..
I think the same problem will apply here, and it's more difficult to
test since print_map_discarded doesn't exist in older binutils and the
target doesn't exist in newer binutils (ppc-lynx178). Let me know if
you think it's worth pursuing.
>
> There's also the question of whether the extra symbol info is
> appropriate when printing discarded sections to the map file. I'd
> think not. To fix that you'll need to change the interface to
> print_one_symbol so that the void* arg points at a struct containing
> both the section pointer and print_input_section's "is_discarded"
> parameter (which would better be renamed to "printing_discarded").
This issue is independent of the above. I think it's interesting to
know if a symbol has been gc'd, but the address info is redundant.
Something like this then?
.pr 0x00000000100012b0 0x0 ./pack1.o
0x00000000100012b0 -->gc .pack1__fooIP
0x00000000100012c0 -->gc .pack1__bumIP
.pr 0x00000000100012b0 0x60 ./test1.o
>
More information about the Binutils
mailing list