[ECOS]undefined reference to `__init_array_end__ when linking with eCOS

Robert Brusa bob.brusa@gmail.com
Tue Jan 20 14:35:00 GMT 2009


Hi
Using the new binaries of the gnu-toolchain for linux for the AT91SAM7x  
target (arm-2008q3-66-arm-none-eabi.bin from Codesourcery) I configured  
eCOS using configtool-081009 downloaded from Ecoscentric then generated  
the library. No problem.

Next is that I compile (again no problem), then link my app - and that's  
were the problems come in. I get the the following error message:

Building target: ifw
Invoking: GCC C Linker
arm-none-eabi-gcc -nostartfiles -L/home/rwb/icfg5/default_install/lib  
-Ttarget.ld -Wl,--gc-sections -Wl,-static -g -nostdlib -Xlinker -Map  
-Xlinker ifw.map -o"ifw"  ./Alignment.o ./EEProm.o ./Log.o ./RPC.o  
./heizer.o ./ictrl.o ./ihw.o ./link.o ./motoren.o ./myastro.o ./novas1.o  
./novascon.o ./rtc.o ./solsys3.o ./sun.o ./trackdefs.o ./util.o
/home/rwb/CodeSourcery/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/bin/ld:  
error: no memory region specified for loadable section `.ARM.exidx'
collect2: ld returned 1 exit status
make: *** [ifw] Fehler 1

I then include the following line in the linker file target.ld:

     .mist ALIGN (0x4) : { . = .; *(.ARM.exidx) } > rom

just in the hope to learn more about the error. But this line is not ok  
either. Firstly it produces an error message and give rise to more errors  
as follows:

Building target: ifw
Invoking: GCC C Linker
arm-none-eabi-gcc -nostartfiles -L/home/rwb/icfg5/default_install/lib  
-Ttarget.ld -Wl,--gc-sections -Wl,-static -g -nostdlib -Xlinker -Map  
-Xlinker ifw.map -o"ifw"  ./Alignment.o ./EEProm.o ./Log.o ./RPC.o  
./heizer.o ./ictrl.o ./ihw.o ./link.o ./motoren.o ./myastro.o ./novas1.o  
./novascon.o ./rtc.o ./solsys3.o ./sun.o ./trackdefs.o ./util.o
/home/rwb/CodeSourcery/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/bin/ld:  
section .data [00120cc0 -> 001213f3] overlaps section .mist [00120cc0 ->  
00120ccf]
/home/rwb/icfg5/default_install/lib/libtarget.a(hal_arm_arch_hal_misc.o):  
In function `cyg_hal_invoke_constructors':
/home/rwb/ecos/packages/hal/arm/arch/current/src/hal_misc.c:217: undefined  
reference to `__init_array_start__'
/home/rwb/ecos/packages/hal/arm/arch/current/src/hal_misc.c:217: undefined  
reference to `__init_array_end__'
collect2: ld returned 1 exit status
make: *** [ifw] Fehler 1

Somehow all the problem seem to root in the eCOS library generated with  
new toolchain. Has anybody made a similar experience and could help.  
Thanks and regards
    Robert

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list