Explicit locations: introduce explicit locations
[deliverable/binutils-gdb.git] / ld / emulparams / elf32_tic6x_le.sh
index 335bc0f857cc949df9ede3471d80b14292f0b38d..efd7b246026525f6d11ce45f86b77b34cb08d7a5 100644 (file)
@@ -31,6 +31,11 @@ RODATA_NAME="const"
 SDATA_NAME="neardata"
 SBSS_NAME="bss"
 BSS_NAME="far"
+OTHER_READONLY_SECTIONS="
+  .c6xabi.extab ${RELOCATING-0} : { *(.c6xabi.extab${RELOCATING+* .gnu.linkonce.c6xabiextab.*}) }
+  ${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); }
+  .c6xabi.exidx ${RELOCATING-0} : { *(.c6xabi.exidx${RELOCATING+* .gnu.linkonce.c6xabiexidx.*}) }
+  ${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }"
 OTHER_SDATA_SECTIONS=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.*}) }"
 OTHER_READONLY_RELOC_SECTIONS="
   .rel.rodata   ${RELOCATING-0} : { *(.rel.rodata${RELOCATING+ .rel.rodata.*}) }
@@ -39,15 +44,20 @@ 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 : 
-  { 
-    . = ALIGN(4); 
-    _HEAP_START = .; 
-    . += 0x2000000; 
-    _HEAP_MAX = .; 
+  .heap :
+  {
+    . = ALIGN(4);
+    _HEAP_START = .;
+    . += 0x2000000;
+    _HEAP_MAX = .;
   }
   .stack :
   {
@@ -55,5 +65,6 @@ case ${target} in
     _STACK_START = .;
   }"
        ;;
-esac
+  esac
+fi
 ATTRS_SECTIONS='.c6xabi.attributes 0 : { KEEP (*(.c6xabi.attributes)) KEEP (*(.gnu.attributes)) }'
This page took 0.023834 seconds and 4 git commands to generate.