Commit | Line | Data |
---|---|---|
40b36596 JM |
1 | SCRIPT_NAME=elf |
2 | TEMPLATE_NAME=elf32 | |
3 | OUTPUT_FORMAT="elf32-tic6x-le" | |
ac145307 BS |
4 | BIG_OUTPUT_FORMAT="elf32-tic6x-be" |
5 | EXTRA_EM_FILE=tic6xdsbt | |
6 | GENERATE_SHLIB_SCRIPT=yes | |
40b36596 JM |
7 | # This address is an arbitrary value expected to be suitable for |
8 | # semihosting simulator use, but not on hardware where it is expected | |
9 | # to be overridden. | |
ac145307 BS |
10 | case ${target} in |
11 | *-elf) | |
12 | TEXT_START_ADDR=0x8000 | |
13 | ;; | |
14 | *-uclinux) | |
15 | TEXT_START_ADDR=0x0 | |
16 | GOT=" | |
17 | .got ${RELOCATING-0} : { | |
18 | *(.dsbt) | |
19 | *(.got.plt) *(.igot.plt) *(.got) *(.igot) | |
20 | }" | |
21 | ;; | |
22 | esac | |
40b36596 JM |
23 | MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" |
24 | ARCH=tic6x | |
25 | EXECUTABLE_SYMBOLS="EXTERN (__c6xabi_DSBT_BASE);" | |
ac145307 | 26 | OTHER_GOT_SYMBOLS="PROVIDE_HIDDEN (__c6xabi_DSBT_BASE = .);" |
40b36596 JM |
27 | # ".bss" is near (small) BSS, ".far" is far (normal) BSS, ".const" is |
28 | # far read-only data, ".rodata" is near read-only data. ".neardata" | |
29 | # is near (small) data, ".fardata" is (along with .data) far data. | |
30 | RODATA_NAME="const" | |
31 | SDATA_NAME="neardata" | |
32 | SBSS_NAME="bss" | |
33 | BSS_NAME="far" | |
6970a028 PB |
34 | OTHER_READONLY_SECTIONS=" |
35 | .c6xabi.extab ${RELOCATING-0} : { *(.c6xabi.extab${RELOCATING+* .gnu.linkonce.c6xabiextab.*}) } | |
36 | ${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); } | |
37 | .c6xabi.exidx ${RELOCATING-0} : { *(.c6xabi.exidx${RELOCATING+* .gnu.linkonce.c6xabiexidx.*}) } | |
38 | ${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }" | |
40b36596 JM |
39 | OTHER_SDATA_SECTIONS=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.*}) }" |
40 | OTHER_READONLY_RELOC_SECTIONS=" | |
41 | .rel.rodata ${RELOCATING-0} : { *(.rel.rodata${RELOCATING+ .rel.rodata.*}) } | |
42 | .rela.rodata ${RELOCATING-0} : { *(.rela.rodata${RELOCATING+ .rela.rodata.*}) }" | |
43 | OTHER_READWRITE_SECTIONS=".fardata ${RELOCATING-0} : { *(.fardata${RELOCATING+ .fardata.*}) }" | |
44 | OTHER_READWRITE_RELOC_SECTIONS=" | |
45 | .rel.fardata ${RELOCATING-0} : { *(.rel.fardata${RELOCATING+ .rel.fardata.*}) } | |
46 | .rela.fardata ${RELOCATING-0} : { *(.rela.fardata${RELOCATING+ .rela.fardata.*}) }" | |
16c1c9d6 CG |
47 | # For relocating operation, skip OTHER_BSS_SECTIONS, or will cause multiple definition. |
48 | if [ ${RELOCATING-0} ]; then | |
49 | OTHER_BSS_SECTIONS=""; | |
50 | else | |
51 | case ${target} in | |
52 | ||
ac145307 BS |
53 | *-elf) |
54 | OTHER_BSS_SECTIONS=" | |
e4492aa0 L |
55 | .heap : |
56 | { | |
57 | . = ALIGN(4); | |
58 | _HEAP_START = .; | |
59 | . += 0x2000000; | |
60 | _HEAP_MAX = .; | |
11dd4e37 BS |
61 | } |
62 | .stack : | |
63 | { | |
64 | . += 0x100000; | |
65 | _STACK_START = .; | |
66 | }" | |
ac145307 | 67 | ;; |
16c1c9d6 CG |
68 | esac |
69 | fi | |
75fa6dc1 | 70 | ATTRS_SECTIONS='.c6xabi.attributes 0 : { KEEP (*(.c6xabi.attributes)) KEEP (*(.gnu.attributes)) }' |