ld linking.
Alan Modra
amodra@bigpond.net.au
Wed Nov 14 15:02:00 GMT 2007
On Tue, Nov 13, 2007 at 11:15:58PM -0700, Brian Beardall wrote:
> as -o lab8.o lab8.S
>
> ld -Tbss 0x00000 -Ttext 0xE0000 --oformat binary -o lab8.bin lab8.o
> lab8.o: In function `initialize':
> (.text+0x183): relocation truncated to fit: R_X86_64_16 against `.text'
> lab8.o: In function `initialize':
> (.text+0x1fffc): relocation truncated to fit: R_X86_64_16 against
> `_start'
You are using a label to specify a 16-bit address field in an
instruction. -Ttext 0xE0000 says to start .text at 0xE0000, so all
labels defined in .text will be outside the range of valid 16-bit
addresses. The linker doesn't know anything about segmented
addressing... I suspect you want -Ttext 0.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list