This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] microblaze: microblaze.md: Use 'SI' instead of 'VOID' for operand 1 of 'call_value_intern'
- From: Chen Gang <gang dot chen dot 5i5j at gmail dot com>
- To: Michael Eager <eager at eagerm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Jeff Law <law at redhat dot com>, davem at redhat dot com
- Date: Mon, 22 Sep 2014 12:10:38 +0800
- Subject: Re: [PATCH] microblaze: microblaze.md: Use 'SI' instead of 'VOID' for operand 1 of 'call_value_intern'
- Authentication-results: sourceware.org; auth=none
- References: <53B9246A dot 5090408 at gmail dot com> <53EB7FE3 dot 40406 at eagerm dot com> <53EC1264 dot 2080205 at gmail dot com> <540C7703 dot 7090303 at gmail dot com> <540D1363 dot 10909 at gmail dot com> <540DCB1B dot 40901 at gmail dot com> <54154907 dot 2000007 at gmail dot com> <541656FE dot 8020008 at eagerm dot com> <541668CF dot 5080206 at gmail dot com> <54170603 dot 8090607 at eagerm dot com> <54176DCF dot 403 at gmail dot com> <54182E13 dot 1090006 at eagerm dot com> <541DA2A0 dot 5040200 at gmail dot com> <541DABEC dot 7090705 at eagerm dot com> <541DAE2B dot 8050104 at gmail dot com> <541E6F2F dot 7080101 at gmail dot com> <541E8A04 dot 7060208 at gmail dot com> <541EAC71 dot 2090403 at gmail dot com> <541F1459 dot 8090003 at eagerm dot com>
On 9/22/14 2:09, Michael Eager wrote:
> 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.
>
OK, thanks.
When gcc, it misses the root directory for "crt1.o" and "crtn.o": e.g.
"/lib/ld.so.1", "crt1.o", "crtn.o" when gcc -v, but we need "/upstream/
release/lib/ld.so.1", "/upstream/lib/crt1.o", "/upstream/libcrtn.o".
I guess, we need additional flag to mark the default system link path
for gcc. But after check the all parameters of gcc, I can not find (-L
is for normal library linkage, but not for crt1.o and crtn.o).
I shall continue trying for it, and hope I can finish within this month.
Welcome any ideas, suggestions or completions.
Thanks.
--
Chen Gang
Open, share, and attitude like air, water, and life which God blessed