This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR binutils/12639: nm/readelf failed to detect corrupted symtab
On Wed, Apr 06, 2011 at 07:47:31AM -0700, H.J. Lu wrote:
> On Wed, Apr 6, 2011 at 7:43 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> > On Tue, Apr 5, 2011 at 11:58 PM, Alan Modra <amodra@gmail.com> wrote:
> >> On the readelf patch, I'd be inclined to report "Bad symtab" at the
> >> end of the symbol table and not special case mips.
> >
> > readelf displays many "<corrupt>" without something like
> > "Bad XXXX" at the end. ?I don't think symtab is that special.
> >
What I should have said here is: Don't special case mips. Display the
symbol binding as you normally do, ie. no <corrupt> message, and
report "Bad symtab" at the end of the table.
The idea is that "Bad symtab" will be displayed for your testcase, and
for targets that set elf_bad_symtab. I'm trying to make the readelf
change more generally useful.
After all, reporting the symbol binding <corrupt> isn't really true.
If anything is corrupt, it's the symtab sh_info in your testcase.
--
Alan Modra
Australia Development Lab, IBM