This is the mail archive of the binutils@sources.redhat.com 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: ld is broken on ia64


On Mon, Nov 19, 2001 at 09:01:25AM -0800, H . J . Lu wrote:
> On Mon, Nov 19, 2001 at 05:48:00PM +1030, Alan Modra wrote:
> > On Sun, Nov 18, 2001 at 10:59:38PM -0800, H . J . Lu wrote:
> > > 
> > > Are you sure under no other conditions r_symndx will be 0?
> > 
> > The only case I know of is a relocation that has no symbol, which is an
> > unusual situation for a relocatable object file.  It can happen, eg.
> > R_PPC64_TOC, but not for any of the R_IA64_SEGREL* relocs.
> > 
> > > Won't that
> > > make relocations against undefined symbols ok?
> > 
> > No.  If you have a symbol, it won't have an index of zero.
> 
> If it is true, I'd like to have some assurances. How about this patch?
> 
> 	* elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when
> 	discarding relocations.

OK, I think.  I had something similar in
http://sources.redhat.com/ml/binutils/2001-11/msg00212.html but my
assert was checking all relocs (and failed, which is what reminded me
of R_PPC64_TOC).

Alan


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