bug-binutils
[Top][All Lists]
Advanced

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

Full file name bug in linker (ld)


From: Andrew Rose
Subject: Full file name bug in linker (ld)
Date: Sun, 12 Jan 2014 10:28:39 +0400

Good day! I build own toolchan under mips architecture
Script to create toolchan:
http://pastebin.com/RxwS09iT
Toolchan build great.
When trying to compile a simple hello world program
 $ CLFS/bin/mips-unknown-linux-gnu-gcc-c testlinker.c
 it compiles fine!

But when I try to use the linker

$ CLFS/bin/mips-unknown-linux-gnu-gcc-c testlinker.c
$ CLFS/bin/mips-unknown-linux-gnu-ld-lc-o testlinker testlinker.o

I get very strange error like : cannot find ... Inside ...

/ home / andrew / Desktop / mips-toolchan / bin / mips-unknown-linux-gnu-ld: 
cannot find / home / andrew / Desktop / mips-toolchan / / root/lib/libc.so.6 
inside / home / andrew / Desktop / mips-toolchan / bin /.. /.. / mips-toolchan 
/ / root
/ home / andrew / Desktop / mips-toolchan / bin / mips-unknown-linux-gnu-ld: 
cannot find / home / andrew / Desktop / mips-toolchan / / root / lib / 
libc_nonshared.a inside / home / andrew / Desktop / mips-toolchan / bin /.. /.. 
/ mips-toolchan / / root
/ home / andrew / Desktop / mips-toolchan / bin / mips-unknown-linux-gnu-ld: 
cannot find / home / andrew / Desktop / mips-toolchan / / root/lib/ld.so.1 
inside / home / andrew / Desktop / mips-toolchan / bin /.. /.. / mips-toolchan 
/ / root

Ie the file name has the full path to the library. Naturally there is a library!
If you remove the option -lc
I get  error:
testlinker.o: In function `main ':
testlinker.c: (. text +0 x24): undefined reference to `puts'


I tried to register via the -L flag is the full path to the directory but it 
did not help .

I think it's a bug


reply via email to

[Prev in Thread] Current Thread [Next in Thread]