This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR binutils/12639: nm/readelf failed to detect corrupted symtab


On Tue, Apr 05, 2011 at 08:13:48PM -0700, H.J. Lu wrote:
> Linker will treat main as local no matter what symtab says.

Right.

> For all practical purposes, any symbol before sh_info is
> a local symbol.
> 
> > What created this bad object file?
> 
> They should remain nameless if possible :-).

:-)  I think you have three options:
a) Issue an error, and refuse to link the bad object file, or
b) Create a new target with elf_bad_symtab set for the target, or
c) Provide some other means of setting elf_bad_symtab.

I really don't like (b).  (c) is a pain, since it isn't just ld, but
objcopy, objdump, etc.

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]