Binutils 2.28 on PowerPC: dangerous relocation: generic linker can't handle R_PPC_SECTOFF_HA
Alan Modra
amodra@gmail.com
Thu May 16 14:05:00 GMT 2019
On Thu, May 16, 2019 at 11:29:48AM +0200, Sebastian Huber wrote:
> On 15/05/2019 06:09, Alan Modra wrote:
> > The source you show is slightly crazy too. Why use @sectoff when
> > expecting a SHN_ABS symbol?
>
> It seems the bootloader must be relocatable. What would be the proper way to
> work with absolute addresses? Store them in global variables which contain a
> abs@fixup relocation?
My point was that sym@sectoff@l and sym@sectoff@ha are exactly the
same as sym@l and sym@ha respectively when sym is SHN_ABS. It's fine
to use @sectoff with symbols for addresses within output sections, but
symbols representing the size of multiple output sections really
shouldn't be @sectoff.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list