This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Trying to work with newlib's libc.a


Hi,

I can compile/link just fine for my powerpc-elf mpc5xx target.  Now I'm
trying to link in libc.a that was configured for a powerpc-elf target, and I
must be doing something wrong.  When I link in the library as follows:

powerpc-elf-ld.exe -g -t -Tram.lnk -o main.elf crt0.o main.o -L. -lc


Everything compiles just fine, but when linking I get the following output:

---------------------------LINKING OBJS--------------------------
powerpc-elf-ld: warning: no memory region specified for section `.fixup'
powerpc-elf-ld: warning: no memory region specified for section `.got2'
powerpc-elf-ld: address 0x848 of main.elf section .bss is not within region
mem
./libc.a(makebuf.o): In function `__smakebuf':
/home/DanFowell/build-newlib/powerpc-elf/newlib/libc/stdio/../../../../../ne
wlib-1.10.0/newlib/libc/stdio/makebuf.c:93: undefined reference to `isatty'
./libc.a(sbrkr.o): In function `_sbrk_r':
/home/DanFowell/build-newlib/powerpc-elf/newlib/libc/reent/../../../../../ne
wlib-1.10.0/newlib/libc/reent/sbrkr.c:60: undefined reference to `sbrk'
./libc.a(writer.o): In function `_write_r':
/home/DanFowell/build-newlib/powerpc-elf/newlib/libc/reent/../../../../../ne
wlib-1.10.0/newlib/libc/reent/writer.c:58: undefined reference to `write'
./libc.a(closer.o): In function `_close_r':
/home/DanFowell/build-newlib/powerpc-elf/newlib/libc/reent/../../../../../ne
wlib-1.10.0/newlib/libc/reent/closer.c:53: undefined reference to `close'
./libc.a(fstatr.o): In function `_fstat_r':
/home/DanFowell/build-newlib/powerpc-elf/newlib/libc/reent/../../../../../ne
wlib-1.10.0/newlib/libc/reent/fstatr.c:62: undefined reference to `fstat'
./libc.a(lseekr.o): In function `_lseek_r':
/home/DanFowell/build-newlib/powerpc-elf/newlib/libc/reent/../../../../../ne
wlib-1.10.0/newlib/libc/reent/lseekr.c:58: undefined reference to `lseek'
./libc.a(readr.o): In function `_read_r':
/home/DanFowell/build-newlib/powerpc-elf/newlib/libc/reent/../../../../../ne
wlib-1.10.0/newlib/libc/reent/readr.c:58: undefined reference to `read'
powerpc-elf-ld: link errors found, deleting executable `main.elf'
----------------------------------------------------------------------------


what are the "fixup" and "got2" sections for?  I don't have those sections
defined in my linker script, but I don't think I want/need them, do I?

My linker script assigns where the .bss section should be put into region
mem.  Is the .bss section of the library fixed?

The undefined reference notifications seem to be related to file handling
related functions, which I don't want/need anyway. Any ideas on how to get
libc.a linking in correctly?  All I really want is the sprintf function
(part of stdio.h).

thanks for any suggestions,clues, or direction,
Dan




------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe at sources dot redhat dot com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]