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]

can't link with crtend.o



Greetings!


I am using sh-elf crosscompiler to build a small program. For some reason, I can't make it link with crtend.o

Here is my gcc (sh-elf-gcc) configuration:
--------------------------------------------------------------------------------------------------------------------
Configured with: ../gcc-3.3.2/configure --target=sh-elf --prefix=/gcc_build/sh4
--enable-languages=c,c++ --with-newlib --program-prefix=sh-elf- --disable-thread
s --with-gxx-include-dir=/gcc_build/sh4/sh-elf/include -v
--------------------------------------------------------------------------------------------------------------------


I am also using gnu linker (ld) version 2.14 built for the sh-elf target as well...


Here is how I build it: sh-elf-gcc -c -m4 -Wall -Wa,-ahls=Program.lst Program.cpp -o Program.o

sh-elf-ld -N -Ttext 0x08000000 -T prog.lnkscr Program.o crtend.o -lc -lm -lgcc -M -S -oformat=binary --verbose -o Program.bin > linkmap.map


Linker complains about an : undefined reference to `__do_global_ctors_aux


I've tried calling _do_global_ctors_aux as well, and even looked inside the crtend.o to make sure that the function is there, but it still would not link...

The most interesting thing, is that the map file generated contains code and data from crtend.o, but still cannot link the function.

Any ideas?



----------------------------------------------------------------
"Normal people ... believe that if it ain't broke, don't fix it. Engineers believe that if it ain't broke, it doesn't have enough features yet."


_________________________________________________________________
Dream of owning a home? Find out how in the First-time Home Buying Guide. http://special.msn.com/home/firsthome.armx

Attachment: linkmap.map
Description: Binary data

Attachment: Program.cpp
Description: Text document

Attachment: prog.lnkscr
Description: Text document

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

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