Question about MIPS elf-rel7

Daniel Jacobowitz drow@mvista.com
Sun May 4 23:59:00 GMT 2003


On Mon, May 05, 2003 at 08:57:35AM +0930, Alan Modra wrote:
> On Sun, May 04, 2003 at 05:20:17PM -0400, Daniel Jacobowitz wrote:
> >         .section .barsec,"aM",@progbits,8
> [snip]
> > Why should the first relocation be section-relative instead of
> > symbol-relative?
> 
> How is escaping this check in gas/write.c:adjust_reloc_syms?
> 
> 	/* Never adjust a reloc against local symbol in a merge section
> 	   with non-zero addend.  */
> 	if ((symsec->flags & SEC_MERGE) != 0
> 	    && (fixp->fx_offset != 0 || fixp->fx_subsy != NULL))
> 	  continue;

At a guess, fixp->fx_offset == 0 and fixp->fx_subsy == NULL?  Yes,
that's right, and it matches the comment - the symbol is local, but we
have a zero addend.

I guess my question is why that test isn't just symsec->flags &
SEC_MERGE.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



More information about the Binutils mailing list