Avoid a spurious "*ABS*" symbol (was: Re: stage one of gas reloc rewrite)
Alan Modra
amodra@bigpond.net.au
Sun Sep 1 18:00:00 GMT 2002
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
More information about the Binutils
mailing list