This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RFC: Discrepancy between sh_info and DT_VERNEEDNUM
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sourceware dot org
- Date: Thu, 27 Nov 2014 11:34:46 +0000
- Subject: RFC: Discrepancy between sh_info and DT_VERNEEDNUM
- Authentication-results: sourceware.org; auth=none
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