]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - ld/emulparams/elf32_tic6x_le.sh
include/elf/
[thirdparty/binutils-gdb.git] / ld / emulparams / elf32_tic6x_le.sh
index 7a78a2cd5845f894b0cf1d48cb873582a01d974a..335bc0f857cc949df9ede3471d80b14292f0b38d 100644 (file)
@@ -1,14 +1,29 @@
 SCRIPT_NAME=elf
 TEMPLATE_NAME=elf32
 OUTPUT_FORMAT="elf32-tic6x-le"
+BIG_OUTPUT_FORMAT="elf32-tic6x-be"
+EXTRA_EM_FILE=tic6xdsbt
+GENERATE_SHLIB_SCRIPT=yes
 # This address is an arbitrary value expected to be suitable for
 # semihosting simulator use, but not on hardware where it is expected
 # to be overridden.
-TEXT_START_ADDR=0x8000
+case ${target} in
+    *-elf)
+       TEXT_START_ADDR=0x8000
+       ;;
+    *-uclinux)
+       TEXT_START_ADDR=0x0
+       GOT="
+.got ${RELOCATING-0} : {
+  *(.dsbt)
+  *(.got.plt) *(.igot.plt) *(.got) *(.igot)
+}"
+       ;;
+esac
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 ARCH=tic6x
 EXECUTABLE_SYMBOLS="EXTERN (__c6xabi_DSBT_BASE);"
-SDATA_START_SYMBOLS="PROVIDE_HIDDEN (__c6xabi_DSBT_BASE = .);"
+OTHER_GOT_SYMBOLS="PROVIDE_HIDDEN (__c6xabi_DSBT_BASE = .);"
 # ".bss" is near (small) BSS, ".far" is far (normal) BSS, ".const" is
 # far read-only data, ".rodata" is near read-only data.  ".neardata"
 # is near (small) data, ".fardata" is (along with .data) far data.
@@ -24,7 +39,9 @@ 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.*}) }"
-OTHER_BSS_SECTIONS="
+case ${target} in
+    *-elf)
+       OTHER_BSS_SECTIONS="
   .heap : 
   { 
     . = ALIGN(4); 
@@ -37,4 +54,6 @@ OTHER_BSS_SECTIONS="
     . +=  0x100000;
     _STACK_START = .;
   }"
+       ;;
+esac
 ATTRS_SECTIONS='.c6xabi.attributes 0 : { KEEP (*(.c6xabi.attributes)) KEEP (*(.gnu.attributes)) }'