aboutsummaryrefslogtreecommitdiff
path: root/ld/emulparams
diff options
context:
space:
mode:
authorChen Gang <gang.chen.5i5j@gmail.com>2015-04-01 11:29:46 +0100
committerNick Clifton <nickc@redhat.com>2015-04-01 11:29:46 +0100
commit16c1c9d6a6f485af1b5b1a54a74dc1ebb25b16c0 (patch)
tree0fb3de4b50fba019bbc57b822ecd007809513c82 /ld/emulparams
parent41f98f0276aede918c3aca37aa6371c8a3c9fbe7 (diff)
downloadgdb-16c1c9d6a6f485af1b5b1a54a74dc1ebb25b16c0.zip
gdb-16c1c9d6a6f485af1b5b1a54a74dc1ebb25b16c0.tar.gz
gdb-16c1c9d6a6f485af1b5b1a54a74dc1ebb25b16c0.tar.bz2
Prevent multiple definitions for _HEAP_START, _HEAP_MAX, and _STACK_START when performing a relocatable link with a tic6x target.
* emulparams/elf32_tic6x_le.sh: Skip OTHER_BSS_SECTIONS for relocating operation.
Diffstat (limited to 'ld/emulparams')
-rw-r--r--ld/emulparams/elf32_tic6x_le.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/ld/emulparams/elf32_tic6x_le.sh b/ld/emulparams/elf32_tic6x_le.sh
index dfd64c1..efd7b24 100644
--- a/ld/emulparams/elf32_tic6x_le.sh
+++ b/ld/emulparams/elf32_tic6x_le.sh
@@ -44,7 +44,12 @@ OTHER_READWRITE_SECTIONS=".fardata ${RELOCATING-0} : { *(.fardata${RELOCATING+ .
OTHER_READWRITE_RELOC_SECTIONS="
.rel.fardata ${RELOCATING-0} : { *(.rel.fardata${RELOCATING+ .rel.fardata.*}) }
.rela.fardata ${RELOCATING-0} : { *(.rela.fardata${RELOCATING+ .rela.fardata.*}) }"
-case ${target} in
+# For relocating operation, skip OTHER_BSS_SECTIONS, or will cause multiple definition.
+if [ ${RELOCATING-0} ]; then
+ OTHER_BSS_SECTIONS="";
+else
+ case ${target} in
+
*-elf)
OTHER_BSS_SECTIONS="
.heap :
@@ -60,5 +65,6 @@ case ${target} in
_STACK_START = .;
}"
;;
-esac
+ esac
+fi
ATTRS_SECTIONS='.c6xabi.attributes 0 : { KEEP (*(.c6xabi.attributes)) KEEP (*(.gnu.attributes)) }'