This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
undefined reference to `__init_array_end__ when linking with eCOS
- From: Robert Brusa <bob dot brusa at gmail dot com>
- To: MailingList:ecos-discuss <ecos-discuss at ecos dot sourceware dot org>;
- Date: Tue, 20 Jan 2009 15:35:59 +0100
- Subject: [ECOS]undefined reference to `__init_array_end__ when linking with eCOS
- Reply-to: Bob dot Brusa at gmail dot com
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