This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Question about MIPS elf-rel7
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