Re: ld dynamic linker x86-64 ?!
- From: Waldek Hebisch <spamtrap@xxxxxxxxxx>
- Date: Thu, 23 Mar 2006 18:58:53 +0000 (UTC)
Claudio Daffra <spamtrap@xxxxxxxxxx> wrote:
ok now work !
i link in this way :
thank you again !
ld \
-m elf_x86_64 \
-dynamic-linker /lib64/ld-linux-x86-64.so.2 \
/usr/lib/crt1.o \
/usr/lib/crti.o \
/usr/lib/gcc/x86_64-linux-gnu/4.0.3/crtbegin.o \
/usr/lib/gcc/x86_64-linux-gnu/4.0.3/crtend.o \
/usr/lib/crtn.o \
-lc \
$1.o \
-o $1.bin
Good that this works for you. But in general crtend.o should go
_after_ your program (it is used to find out where your program ends).
So you should rather use:
ld \
-m elf_x86_64 \
-dynamic-linker /lib64/ld-linux-x86-64.so.2 \
/usr/lib/crt1.o \
/usr/lib/crti.o \
/usr/lib/gcc/x86_64-linux-gnu/4.0.3/crtbegin.o \
1.o \
/usr/lib/gcc/x86_64-linux-gnu/4.0.3/crtend.o \
/usr/lib/crtn.o \
-lc \
-o $1.bin
--
Waldek Hebisch
hebisch@xxxxxxxxxxxxxxxx
.
- References:
- ld dynamic linker x86-64 ?!
- From: Claudio Daffra
- Re: ld dynamic linker x86-64 ?!
- From: Waldek Hebisch
- Re: ld dynamic linker x86-64 ?!
- From: Claudio Daffra
- Re: ld dynamic linker x86-64 ?!
- From: Claudio Daffra
- ld dynamic linker x86-64 ?!
- Prev by Date: Re: Kernel Calling Conventions
- Next by Date: Re: Kernel Calling Conventions
- Previous by thread: Re: ld dynamic linker x86-64 ?!
- Next by thread: newbie questiom about %rip in x86-64 and var
- Index(es):