Steve Franks wrote: >Anyone know what lib's contain the following? I can't seem to locate >it. Or, it could be a link ordering problem, I suppose. I get the >same errors when adding either a call to sprintf or std::stringstream > >Thanks, >Steve > >C:\WinARM\arm-elf\lib\libc.a(mallocr.o): In function >`_malloc_r':mallocr.c:(.text+0x430): undefined reference to `_sbrk_r' >:mallocr.c:(.text+0x5ec): undefined reference to `_sbrk_r' >C:\WinARM\arm-elf\lib\libc.a(syswrite.o): In function >`write':syswrite.c:(.text+0x24): undefined reference to `_write_r' >C:\WinARM\arm-elf\lib\libc.a(freer.o): In function >`_malloc_trim_r':mallocr.c:(.text+0x48): undefined reference to >`_sbrk_r' >:mallocr.c:(.text+0x70): undefined reference to `_sbrk_r' >:mallocr.c:(.text+0xb4): undefined reference to `_sbrk_r' >C:\WinARM\arm-elf\lib\libc.a(makebuf.o): In function >`__smakebuf':makebuf.c:(.text+0x44): undefined reference to `_fstat_r' >:makebuf.c:(.text+0xe4): undefined reference to `isatty' >C:\WinARM\arm-elf\lib\libc.a(stdio.o): In function >`__sread':stdio.c:(.text+0x1c): undefined reference to `_read_r' >C:\WinARM\arm-elf\lib\libc.a(stdio.o): In function >`__swrite':stdio.c:(.text+0x78): undefined reference to `_lseek_r' >:stdio.c:(.text+0x9c): undefined reference to `_write_r' >C:\WinARM\arm-elf\lib\libc.a(stdio.o): In function >`__sseek':stdio.c:(.text+0xc0): undefined reference to `_lseek_r' >C:\WinARM\arm-elf\lib\libc.a(stdio.o): In function >`__sclose':stdio.c:(.text+0xf8): undefined reference to `_close_r' >make: *** [main.elf] Error 1 > > > Those are definately newlib stub functions being called. A stub is a hook in newlib that normally doesn't require any external function to be linked to it, unless that stub function gets linked into your program. Look around for newlib stub examples. I have a number of those stub functions on the rdcf2 DOS filesystem: http://www.openhardware.net/?title=RDCF2%20DOS%20FAT%20Filesystem%20for%20LPC2138&dir=rdcf2&file=rdcf2lpc2138.html TomW -- Tom Walsh - WN3L - Embedded Systems Consultant http://openhardware.net, http://cyberiansoftware.com "Windows? No thanks, I have work to do..." ----------------------------------------------------
Message
Re: [lpc2000] link problem.
2006-02-17 by Tom Walsh
Attachments
- No local attachments were found for this message.