Mail Archives: djgpp/1996/12/26/06:37:10
On 26 Dec 1996, Kuang-Chun Cheng wrote:
> ld -Tc:/djgpp/lib/djgpp.lnk -o test1 test.o
> ld -o test2 test.o
>
> test1 is smaller than test2. Could someone explain this?
How much smaller? Is it smaller by 2048 bytes? If so, that's because
the default target for ld is to create a .exe-style executable (you
should see the characters `M' and `Z' as the first two bytes of test2).
OTOH, test1 is an unstabbed COFF file, which doesn't include the 2KB-long
stub.
I think the default alignment is also different from what the linker
script says, which might explain additional differences.
Btw, it is only natural that you get different results with and without
the script, otherwise it would be superflous, right?
> Btw, what does .bss (in asm code) stand for?
Uninitialized data gets into that section.
- Raw text -