This is the mail archive of the
mailing list for the binutils project.
Re: RFC: Discrepancy between sh_info and DT_VERNEEDNUM
- From: Alan Modra <amodra at gmail dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 27 Nov 2014 23:08:05 +1030
- Subject: Re: RFC: Discrepancy between sh_info and DT_VERNEEDNUM
- Authentication-results: sourceware.org; auth=none
- References: <87sih4vpux dot fsf at redhat dot com>
On Thu, Nov 27, 2014 at 11:34:46AM +0000, Nick Clifton wrote:
> 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
I looked at this recently, and I'd say this is just an omission in the
documentation. .gnu.version_r first appeared in binutils-2.8 and
we've set sh_info right from the beginning.
> shortcut and that really the DT_VERNEEDNUM value should be used.
No, I don't think so. _bfd_elf_print_private_bfd_data is one of many
places that assumes linking model ELF info (section headers) are
available in executables. If the section headers are there, use them.
Outside of fuzzed objects, if sh_info disagrees with DT_VERNEEDNUM
then you have nasty gremlins lurking in your system.
Australia Development Lab, IBM