This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
h8300-elf/rtems bug in linker scripts
- From: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- To: binutils at sourceware dot org
- Date: Mon, 14 Aug 2006 16:11:34 -0500
- Subject: h8300-elf/rtems bug in linker scripts
Hi,
binutils 2.17 targeting h8300-rtems4.7 (h8300-elf).
Error when linking application:
h8300-rtems4.7-gcc -B../../../../../h8sim/lib/ -specs bsp_specs -qrtems
-mh -mint32 -O0 -o hello.exe init.o
../../../../../h8sim/lib/no-dpmem.rel
../../../../../h8sim/lib/no-event.rel
../../../../../h8sim/lib/no-msg.rel ../../../../../h8sim/lib/no-mp.rel
../../../../../h8sim/lib/no-part.rel
../../../../../h8sim/lib/no-signal.rel
../../../../../h8sim/lib/no-timer.rel ../../../../../h8sim/lib/no-rtmon.rel
../../../../../h8sim/lib/no-event.rel: In function `_tinydata':
(.tinydata+0x0): multiple definition of `_tinydata'
../../../../../h8sim/lib/no-dpmem.rel:(.tinydata+0x0): first defined here
../../../../../h8sim/lib/no-msg.rel: In function `_tinydata':
(.tinydata+0x0): multiple definition of `_tinydata'
../../../../../h8sim/lib/no-dpmem.rel:(.tinydata+0x0): first defined here
../../../../../h8sim/lib/no-mp.rel: In function `_tinydata':
(.tinydata+0x0): multiple definition of `_tinydata'
Every .rel is the output of an "h8300-rtems4.7-ld -r" and
somehow is introducing the symbol _tinydata into the
relocatable.
I edited the installed h8300helf.xr which was the one used in this
case and commented out "_tinydata = .;", rebuilt and the link issue
went away.
It looks to me like a ldscript used to produce a relocatable file
should not introduce symbols in this manner. Is this correct?
What's the right way to fix this? I am unsure of what to edit
in the original source to get rid of these symbols in relocatables.
Do they even need to be in executables?
Thanks.
--joel sherrill