This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: h8300-elf/rtems bug in linker scripts
Thanks for the suggestion. It seems to have worked. I have attached
the patch.
I think this should be committed to the 2.17 branch and head.
--joel
2006-08-15 Joel Sherrill <joel.sherrill@oarcorp.com>
emulparams/h8300elf.sh: _tinydata should not be placed in
relocatables.
Alan Modra wrote:
On Mon, Aug 14, 2006 at 04:11:34PM -0500, Joel Sherrill wrote:
It looks to me like a ldscript used to produce a relocatable file
should not introduce symbols in this manner. Is this correct?
Yes.
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.
Wrap the assignment in ${RELOCATING+ }. Do the same for the vma on
.tinydata and lma on .tinybss. emulparams/h8300elf.sh
Do they even need to be in executables?
I don't know enough about the ABI to answer that.
2006-08-15 Joel Sherrill <joel.sherrill@oarcorp.com>
emulparams/h8300elf.sh: _tinydata should not be placed in relocatables.
diff -uNr binutils-2.17-orig/ld/emulparams/h8300elf.sh binutils-2.17/ld/emulparams/h8300elf.sh
--- binutils-2.17-orig/ld/emulparams/h8300elf.sh 2005-12-22 11:43:34.000000000 -0600
+++ binutils-2.17/ld/emulparams/h8300elf.sh 2006-08-15 08:56:21.000000000 -0500
@@ -17,7 +17,7 @@
TINY_DATA_SECTION=".tinydata 0xff8000 :
{
*(.tinydata)
- _tinydata = .;
+ ${RELOCATING+ _tinydata = .; }
}"
TINY_BSS_SECTION=".tinybss : AT (_tinydata)
{