ld linking against wrong libs
When using ld manually it links against the wrong lib as seen below.
This is only in the binutils 215 case, the old binutils works like it should.
== Paste
[eirik@shuttle]~/<1>test> cat ld.c
#include <stdio.h>
int
main(void)
{
printf("Worked!\n");
return(0);
}
[eirik@shuttle]~/<1>test> gcc -c ld.c
[eirik@shuttle]~/<1>test> /usr/libexec/binutils215/elf/ld /usr/lib/crt1.o -L/usr/lib -lc ld.o -o ld
[eirik@shuttle]~/<1>test> ldd ld
ld:
ELF interpreter /usr/lib/libc.so.1 not found
ld: signal 6
[eirik@shuttle]~/<1>test> /usr/libexec/binutils212/elf/ld /usr/lib/crt1.o -L/usr/lib -lc ld.o -o ld
[eirik@shuttle]~/<1>test> ldd ld
ld:
libc.so.4 => /usr/lib/libc.so.4 (0x28073000)
== End paste
--
Eirik Nygaard
討論串 (同標題文章)
完整討論串 (本文為第 1 之 4 篇):