Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: Linker Problems

2005-12-21 by miruffer

Hi,

thank you for your answer. I look at your scripts and have seen that
you use the flag --disable-newlib-supplied-syscalls. I have rebuilt my
GNU Toolchain. 
When the linker links my project, there are the errors shown below.

/opt/arm-tools/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/libc.a(writer.o):
In function `_write_r':
../../../../../newlib-1.13.0/newlib/libc/reent/writer.c:58: undefined
reference to `_write'
/opt/arm-tools/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/libc.a(closer.o):
In function `_close_r':
../../../../../newlib-1.13.0/newlib/libc/reent/closer.c:53: undefined
reference to `_close'
/opt/arm-tools/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/libc.a(fstatr.o):
In function `_fstat_r':
../../../../../newlib-1.13.0/newlib/libc/reent/fstatr.c:62: undefined
reference to `_fstat'
/opt/arm-tools/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/libc.a(lseekr.o):
In function `_lseek_r':
../../../../../newlib-1.13.0/newlib/libc/reent/lseekr.c:58: undefined
reference to `_lseek'
/opt/arm-tools/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/libc.a(readr.o):
In function `_read_r':
../../../../../newlib-1.13.0/newlib/libc/reent/readr.c:58: undefined
reference to `_read'
/opt/arm-tools/lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/libstdc++.a(eh_personality.o):



All the functions he can't find, are exsisting in my own libary the
linker had opend before. I can't understand that.


thanks miru

In function `base_of_encoded_value':
--- In lpc2000@yahoogroups.com, Tom Walsh <tom@o...> wrote:
>
> miruffer wrote:
> 
> >Hi,
> >
> >I have big problems with the gcc-linker. Last week I compiled the
> >newest version of gcc(4.0.2), binutils(2.16.1) and newlib(1.13) under
> >linux debian. Before I worked with WinARM(gcc 4.0.0).
> >
> >I tried to compile my project with the new toolchain. No warnings no
> >errors. But the printf didn't work. To let the printf work via uart1 I
> >have initialized it and have rewritten some function of the libc:
> >_write_r and _read_r. Everything works well with WinARM. Now I looked
> >in the assembler code compiled with the new toolchain and the linker
> >has used the _write_r from libc and not my new one.
> >
> >Can I force the linker to use my new one?
> >
> >  
> >
> Sure, get a large hammer...  I would look to your library itself, you 
> have to turn on some options within newlib to compile it out into stubs 
> for some of the I/O code.  Take a look at the scripts I use to build my 
> development environment with, I use the newlib stubs to do char I/O
from 
> the library: 
> 
> 
>
http://www.openhardware.net/?title=ARM%20Thumb%20tools%20for%20LPC2000&dir=ArmTools&file=ThumbToolchain.html
> 
> Regards,
> 
> TomW
> 
> -- 
> Tom Walsh - WN3L - Embedded Systems Consultant
> http://openhardware.net, http://cyberiansoftware.com
> "Windows? No thanks, I have work to do..."
> ----------------------------------------------------
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.