ld linking against wrong libs

看板DFBSD_bugs作者時間21年前 (2005/04/08 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/4 (看更多)
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
文章代碼(AID): #12LNMB00 (DFBSD_bugs)
文章代碼(AID): #12LNMB00 (DFBSD_bugs)