stage one of gas reloc rewrite

Alan Modra amodra@bigpond.net.au
Sat Aug 31 16:29:00 GMT 2002


On Sat, Aug 31, 2002 at 11:35:10AM -0400, Hans-Peter Nilsson wrote:
> I'm suspicious.  For most of the tests, you add local unnamed
> "*ABS*" symbols.  That doesn't seem right; I'd rather expect
> removal of local "*ABS*" symbols (or more removed than added).

I was waiting for this comment from you.  If you hadn't written such
a comprehensive testsuite, you'd never have noticed.  :-)

The symbol being added is the absolute section symbol.  You'll find
that in these cases it is in fact being used in relocs, so it's the
generally correct thing to do.  Note the comment at the end of
adjust_reloc_syms about BFD not handling relocs without symbols very
well.  The comment is right;  bfd_install_relocation will segfault
without a symbol.

That particular issue is really orthogonal to whether the symbol needs
to appear in the object file, but the comment used to say that COFF
support in BFD needed a symbol and I was worried that COFF needed a
symbol to be emitted.  In the case of ELF, I'll agree that the
absolute section symbol need not be emitted.  We can tidy that up
later.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list