ld dynamic linker x86-64 ?!



hi all

hi have compiler a program in this way :

gcc x.c -S -o x.s
as x.s -o x.o
gcc x.o -o x

and work good but with ...

gcc x.c -S -o x.s
as x.s -o x.o
ld -e main -dynamic-linker /lib64/ld-linux-x86-64.so.2 -lc x.o -o x

the program terminate with seg. fault error ?

with command ldd x :

:~/source# ldd x
libc.so.6 => /lib/libc.so.6 (0x00002aaaaabc3000)
/lib64/ld-linux-x86-64.so.2 (0x00002aaaaaaab000)
:~/source#

all seem work good but ...

i don't mean can't use ld to link c library
and with gcc all work good

can u help me?

regards

claudio

.



Relevant Pages