This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
ld of binutils 2.12 appends two (garbage?) bytes
- From: Felix Kühling <fxkuehl at gmx dot de>
- To: binutils at sources dot redhat dot com
- Date: Fri, 10 May 2002 16:56:10 +0200
- Subject: ld of binutils 2.12 appends two (garbage?) bytes
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!