Using __bss_start to write relocatable code?

Ian Lance Taylor ian@wasabisystems.com
Wed Mar 3 20:02:00 GMT 2004


Ray Whitmer <ray@xmission.com> writes:

> I suppose I could do two move.l instructions followed by a subtract,
> but that is getting rather lengthy and uses more registers than I
> had hoped.  Is there any other way to reference, as a literal, the
> offset to a symbol from the .bss section start?

No, not with m68k-elf.

To make this work, you would need a new relocation type, perhaps along
the lines of the R_MIPS_GPREL32 relocation used on MIPS.

Ian



More information about the Binutils mailing list