sparc TPOFF handling in GOLD

David Miller davem@davemloft.net
Wed Feb 10 19:53:00 GMT 2010


From: David Miller <davem@davemloft.net>
Date: Tue, 09 Feb 2010 23:37:01 -0800 (PST)

> Maybe I'm missing something obvious here that can be used to make this
> work?  Perhaps I need to use a target specific relocation?

Ian, in thinking about this more, I think there is a reasonable
need for being able to emit relocations that:

1) Behave like ->add_*_relative() wrt. setting the symbol index
   and computing the RELA addend.

2) But does not influence reloc sorting or the incrementing
   of RELACOUNT.

This could be simply implemented using two boolean states
instead of one in Output_reloc, then adding a variant of
the ->add_*_relative() methods which takes an extra boolean
to indicate "this is a relative reloc but not R_${TGT}_RELATIVE"

Another approach could be to make the elfcpp::R_${TGT}_RELATIVE
value available in the target info, and compare that, but I
think that's ugly.

I considered using a target specific relocation for this, but it's
such a waste to have to store away the necessary information that the
Output_reloc::write() method already has readily available.

What do you think?



More information about the Binutils mailing list