strange linking problem
Alexander Gdalevich
gdalevich@hotmail.com
Mon Dec 15 18:05:00 GMT 2003
I am trying to build for the sh4 target that uses newlib instead glibc. I
am not exactly sure what you mean by "bare-metal". If it means no operating
system, then yes, I am trying to compile a custom RTOS for the sh4-based
system.
BTW, I've figured out the issue with _impure_ptr. Newlib uses struct _reent
to make standard C library functions reentrant. I just have to have a
global variable named _impure_ptr that is a pointer to struct _reent.
However, I still can't figure why ld cant find libc.
>From: Dan Kegel <dank@kegel.com>
>To: Alexander Gdalevich <gdalevich@hotmail.com>
>CC: crossgcc@sources.redhat.com
>Subject: Re: strange linking problem
>Date: Mon, 15 Dec 2003 09:04:56 -0800
>
>Alexander Gdalevich wrote:
>>I've recently build the newest gcc 3.3.2 cross-compiler. It works fine,
>>but I have trouble linking with ld.
>>
>>Here is the output from gcc when compiling a regular helloworld program:
>>
>>Program
>>===============================
>>hello.c
>>---------------------------------------------------------------------
>>#include <stdio.h>
>>
>>int main(int argc, char ** argv)
>>{
>> return fprintf(stderr, "Hello world!\r\n");
>>}
>>===============================
>>
>>
>>Output when linked with collect2:
>>
>>===============================
>>sh-elf-gcc -mb -fno-delayed-branch -O2 -m4 -v hello.c
>>----------------------------------------------------------------------
>>
>>Reading specs from /gcc_build/sh4/lib/gcc-lib/sh-elf/3.3.2/specs
>>Configured with: ../gcc-3.3.2/configure --target=sh-elf
>
>Before we dive in: target sh-elf is for newlib / bare metal targets
>that don't have glibc. Are you quite sure that's what you wanted?
>- Dan
>
>------
>Want more information? See the CrossGCC FAQ,
>http://www.objsw.com/CrossGCC/
>Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
>
>
_________________________________________________________________
Shop online for kids toys by age group, price range, and toy category at
MSN Shopping. No waiting for a clerk to help you! http://shopping.msn.com
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list