ld of binutils 2.12 appends two (garbage?) bytes
Felix Kühling
fxkuehl@gmx.de
Fri May 10 07:56:00 GMT 2002
Hi,
I'm assembling and linking a master boot record for the ia32
architecture which has to be exactly 446 bytes long. After upgrading
from binutils 2.10 to 2.12 it gets 2 bytes too long. I first assumed the
linker tried to make the length divisible by 4. But it does not append
zeros. Here is the end of the hexdump:
00001b0 0000 0000 0000 0000 0000 0000 0000 f689
The appended two bytes are apperently not random, they're always the
same. Is there some trick to get rid of this behaviour other than
writing a program that takes the two extra bytes away?
Here is the output of size for the object file:
/tools/bin/i686-ml-linux-size newmbr.o
text data bss dec hex filename
446 0 0 446 1be newmbr.o
The linker command line used so far is:
$(LD) -Ttext 0x600 -s --oformat binary $*.o -o $*.bin
Thanks for your help,
Felix Kühling
__\|/__ ___ ___ ___
__TschüÃ_______\_6 6_/___/__ \___/__ \___/___\___You can do anything,___
_____Felix_______\Ã/\ \_____\ \_____\ \______U___just not everything____
fxkuehl@gmx.de >o<__/ \___/ \___/ at the same time!
More information about the Binutils
mailing list