Linker Group Issue

support for the ARM toolchain
Post Reply
automaton
Posts: 3
Joined: Thu Jun 03, 2010 5:50 pm

Linker Group Issue

Post by automaton » Tue Jul 27, 2010 5:20 pm

I'm having an issue defining abort in my own C library when using a linking group and libgcc.a is outside of the link group. For instance, if my Makefile included:
arm-eabi-ld --entry=__start -T ld.script -o foo.bin foo.o --start-group -lmylib -lmylib2 --end-group "c:/devkitpro/devkitarm/bin/../lib/gcc/arm-eabi/4.5.0/libgcc.a"

abort is not found in mylib.a and I will get an undefined reference to `abort' in the following functions: unwind_phase2, __gnu_Unwind_Resume, _Unwind_GetDataRelBase, _Unwind_GetTextRelBase.

The link will complete successfully if I use the following:
arm-eabi-ld --entry=__start -T ld.script -o foo.bin foo.o --start-group -lmylib -lmylib2 "c:/devkitpro/devkitarm/bin/../lib/gcc/arm-eabi/4.5.0/libgcc.a" --end-group

With CodeSourcery, my original link command works correctly. Might this be a bug with devkitARM?

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Linker Group Issue

Post by WinterMute » Wed Jul 28, 2010 1:10 pm

No, this is the default behaviour with gcc for a baremetal arm target. It's possible Codesourcery have modified their build to avoid some circular dependencies.

Is it worth looking at replacing whatever functions are being used from libgcc?
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest