On 09/21/14 03:46, Chen Gang wrote:
Excuse me, I want to consult one thing: I installed raw microblaze cross
compiler, binutils and glibc into one directory (/upstream/release), and
try to build a "Hello world" C program for microblaze under x86_64 host.

I guess it is OK, but I am not quite sure about it (I use raw compiler,
and have to point out "/upstream/release/lib/ld.so.1" explicitly, and
receive a warning related with 'ld').

Is it really OK? can I still use raw compiler for our testsuite? Is
'LinkScr.ld' for ldscript related with current case?


   [root@localhost test]# /upstream/release/bin/microblaze-gchen-linux-gcc 
-nostdinc -c -o test.o test.c
   [root@localhost test]# /upstream/release/bin/microblaze-gchen-linux-ld -o 
test test.o /upstream/release/lib/ld.so.1 -lc -L/upstream/release/lib

     /upstream/release/bin/microblaze-gchen-linux-ld: warning: cannot find 
entry symbol _start; defaulting to 0000000010000180

Generally, you should use "gcc" to link programs, not "ld".  gcc is
a driver which will select the appropriate libraries and support routines
(such as crt0.o, which contains _start) and pass them to the linker.

--
Michael Eager    ea...@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

Reply via email to