RE: [arm-gnu]linker error section .got
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [arm-gnu]linker error section .got
- To: <Bob.Brusa@xxxxxxxxx>, "Daniel Jacobowitz" <dan@xxxxxxxxxxxxxxxx>
- Subject: RE: [arm-gnu]linker error section .got
- From: "Sun Yanfei" <Yanfei.Sun@xxxxxxxxxxxxx>
- Date: Fri, 16 Jan 2009 13:09:19 +0800
Add "--fno-use-cxa-atexit " in you compile command line can fix this
issue.
Best Regards,
Ray
-----Original Message-----
From: Robert Brusa [mailto:bob.brusa@xxxxxxxxx]
Sent: Thursday, January 15, 2009 6:29 PM
To: Daniel Jacobowitz; Robert Brusa
Cc: arm-gnu@xxxxxxxxxxxxxxxx
Subject: Re: [arm-gnu]linker error section .got
On Wed, 14 Jan 2009 23:32:09 +0100, Daniel Jacobowitz
<dan@xxxxxxxxxxxxxxxx> wrote:
> On Wed, Jan 14, 2009 at 11:00:06PM +0100, Robert Brusa wrote:
>> Hi
>> when compiling and linking my at91sam7x-application, I get the error
>> message:
>>
>> linux-gnueabi/bin/ld: error: no memory region specified for loadable
>> section `.got'
>>
>> The toolchain I used before did not produce a .got-section. I could
find
>> nowhere information where this section should go, how much space it
>> should
>> get and where (ram or rom?). Does somebody know the answers to these
>> questions?
>
> Are you really building a Linux application? It sounds like you
> aren't; you should use the arm-none-eabi tools instead in that case.
>
Hi
I see, I got it wrong. Now I downloaded and installed the arm-none-eabi
toolchain (file:arm-2008q3-66-arm-none-eabi.bin) and installed it. Here
are the results:
-running configtool for eCOS (configuration for an AT91SAM7X256-based
board):
starting it up, clear, then editing the prefix and removing the -m
option
(arm4v is default) and building the eCOS. All ok
-Building my application that uses the above built eCOS library:
Compilation ok, but the linker finds hitherto unseen errors:
arm-none-eabi-gcc -nostartfiles -L/home/rwb/icfg3/ecos_install/lib
-Ttarget.ld -Wl,-u,atexit -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/icfg3/ecos_install/lib/libtarget.a(kernel_thread.o): In
function
`_GLOBAL__I.15000__ZN18Cyg_HardwareThread12thread_entryEP10Cyg_Thread':
/home/rwb/ecos/packages/kernel/current/src/common/thread.cxx:1283:
undefined reference to `__dso_handle'
/home/rwb/icfg3/ecos_install/lib/libtarget.a(kernel_intr.o): In function
`_GLOBAL__I.12000__ZN13Cyg_Interrupt15disable_counterE':
/home/rwb/ecos/packages/kernel/current/src/intr/intr.cxx:790: undefined
reference to `__dso_handle'
/home/rwb/icfg3/ecos_install/lib/libtarget.a(kernel_sched.o): In
function
`_GLOBAL__I.11000_cyg_scheduler_sched_lock':
/home/rwb/ecos/packages/kernel/current/src/sched/sched.cxx:755:
undefined
reference to `__dso_handle'
/home/rwb/icfg3/ecos_install/lib/libtarget.a(services_memalloc_common_he
aps.o):
In function `_GLOBAL__I.46900_cygmem_pool_heap1':
/home/rwb/icfg3/ecos_build/services/memalloc/common/current/heaps.cxx:26
:
undefined reference to `__dso_handle'
/home/rwb/icfg3/ecos_install/lib/libtarget.a(language_c_libc_startup_mai
nthread.o):
In function `_GLOBAL__I.52000_cyg_libc_main_thread':
/home/rwb/ecos/packages/language/c/libc/startup/current/src/mainthread.c
xx:131:
undefined reference to `__dso_handle'
/home/rwb/icfg3/ecos_install/lib/libtarget.a(kernel_clock.o):/home/rwb/e
cos/packages/kernel/current/src/common/clock.cxx:941:
more undefined references to `__dso_handle' follow
/home/rwb/CodeSourcery/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-eabi/4.
3.2/../../../../arm-none-eabi/lib/libsupc++.a(atexit_arm.o):
In function `__aeabi_atexit':
atexit_arm.cc:(.text.__aeabi_atexit+0x10): undefined reference to
`__cxa_atexit'
collect2: ld returned 1 exit status
make: *** [ifw] Fehler 1
It seems I am still on the wrong track with this toolchain - or did
anybody succeed in building an eCOS-based app using these tools?
Thanks for help and regards - Robert