Linker Group Issue
Posted: 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?
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?