as: redefinition of relocatable items fails

Alan Modra amodra@bigpond.net.au
Wed Nov 24 22:27:00 GMT 2004


On Wed, Nov 24, 2004 at 04:37:50PM +0100, Albert van der Horst wrote:
>     .equ cannot handle redefinition for relocatable values.

True.  Not trivial to fix, unfortunately.  You'd need to keep old
definitions of symbols around for relocations.  Something like:
- Add an old_def pointer to struct symbol, and keep old definitions on
  that chain.
- Modify all code that touches symbols to look in the old_def chain too,
  eg. symbol resolution.
- Do something special when writing relocations if an old_def is used
  and not converted to a section symbol.  It might work to just use the
  current symbol definition with an addend.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list