LD, section start option doesn't work?
Posted: Fri Sep 03, 2010 5:05 am
Hi,
I just want to set the .text segment address through ld's option (--section-start .text=org).
Nevertheless, after linking, the .text segment start at an other address.
My code is similar to:
Assembling, linking:
_start isn't located at 0x08048000 but at 0x080480da.
So, what is wrong ?
I just want to set the .text segment address through ld's option (--section-start .text=org).
Nevertheless, after linking, the .text segment start at an other address.
My code is similar to:
Code: Select all
[...]
.text
.global _start
_start:
xor eax,eax
inc eax
int 0x80
Code: Select all
as -o test.o test.s
ld --section-start .text=0x08048000 --oformat binary -o test test.o
So, what is wrong ?