RFC: Discrepancy between sh_info and DT_VERNEEDNUM
Nick Clifton
nickc@redhat.com
Thu Nov 27 11:34:00 GMT 2014
Hi Guys,
In the tarball attached to PR 17512, comment 112 there is a file
id:000010,src:000000,op:flip4,pos:4940, which I have also attached to
this email. This file contains a discrepancy between the value of
DT_VERNEEDNUM (1) and the sh_info field of the SHT_GNU_Verneed section
header (0xe000), which leads "objdump -x <that file>" to go into a
very long loop printing out garbage version need information.
As far as I can tell the use of the sh_info field is an undocumented
shortcut and that really the DT_VERNEEDNUM value should be used.
Either way though the discrepancy ought to be detected and reported.
The problem I have however is that I am not sure of the right place to
detect this problem. I have a local patch that adds a test into
bfd/elf.c:_bfd_elf_print_private_bfd_data but that only affects
printing out the version information. A better patch I feel would
detect and report the problem when the SHT_GNU_Verneed section is read
in. What do other people think ?
Cheers
Nick
More information about the Binutils
mailing list