This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Avoid a spurious "*ABS*" symbol (was: Re: stage one of gas reloc rewrite)
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Hans-Peter Nilsson <hp at bitrange dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 2 Sep 2002 10:30:13 +0930
- Subject: Re: Avoid a spurious "*ABS*" symbol (was: Re: stage one of gas reloc rewrite)
- References: <20020901085952.E18764@bubble.sa.bigpond.net.au> <Pine.BSF.4.30.0209011330150.67694-100000@dair.pair.com>
On Sun, Sep 01, 2002 at 06:22:13PM -0400, Hans-Peter Nilsson wrote:
> I'm confused; it looks like the code and comment has things
Sorry for the lack of clarity. The comment is in adjust_reloc_syms,
but the place where we really need to add the symbol is in
fixup_segment, on pcrel fixups.
> - Do you (Alan and other people) agree this (handling fx_addsy
> NULL for fixups for constant expressions -- usually fx_pcrel)
> is the right route?
Well, in some ways having the abs symbol is a hack. However, the
common case is that relocations have a symbol. By not putting a
symbol on pcrel fixups, where we do want a reloc, we will probably
require code in lots of places to test for this case. I'm inclined to
say no, unless you can prove me wrong about the extra code.
> - What amount of testing would be needed? Would it suffice that
> none of the targets you (Alan) mentioned have test-suite
> regressions? Or what else would be needed?
That set of targets give fairly good test coverage, modulo how good
the actual target tests are!
> Some alternatives I have *not* tried:
[snip]
I'd be inclined to strip out the symbol using obj_frob_symbol, unless
no object format needs it. In which case it can be stripped out by
adding a test near the place where EMIT_SECTION_SYMBOLS is used.
I haven't properly researched whether some object formats need the
symbol in the object file. I just tried getting rid of it in some
early versions of the patch and ran into problems. With COFF, from
memory.
--
Alan Modra
IBM OzLabs - Linux Technology Centre