DragonFly BSD
DragonFly bugs List (threaded) for 2005-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

ld linking against wrong libs


From: Eirik Nygaard <eirikn@xxxxxxxxxxxx>
Date: Thu, 7 Apr 2005 19:00:33 +0200
Mail-followup-to: bugs@crater.dragonflybsd.org

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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]