Commit | Line | Data |
---|---|---|
a2b3c630 SC |
1 | # If you change this file, please also look at files which source this one: |
2 | # shelf32_linux.sh | |
3 | ||
4 | SCRIPT_NAME=elf | |
5 | OUTPUT_FORMAT="elf32-sh64-linux" | |
485cf679 | 6 | NO_REL_RELOCS=yes |
a2b3c630 | 7 | TEXT_START_ADDR=0x400000 |
24718e3b L |
8 | MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" |
9 | COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" | |
a2b3c630 SC |
10 | ARCH=sh |
11 | MACHINE=sh5 | |
12 | ALIGNMENT=8 | |
13 | TEMPLATE_NAME=elf32 | |
14 | GENERATE_SHLIB_SCRIPT=yes | |
308f753f | 15 | GENERATE_PIE_SCRIPT=yes |
a94d834c NC |
16 | # PR 17739. Delay checking relocs until after all files have |
17 | # been opened and linker garbage collection has taken place. | |
18 | CHECK_RELOCS_AFTER_OPEN_INPUT=yes | |
a2b3c630 SC |
19 | |
20 | DATA_START_SYMBOLS='PROVIDE (___data = .);' | |
21 | ||
22 | # If data is located right after .text (not explicitly specified), | |
23 | # then we need to align it to an 8-byte boundary. | |
24 | OTHER_READONLY_SECTIONS=' | |
25 | PROVIDE (___rodata = DEFINED (.rodata) ? .rodata : 0); | |
26 | . = ALIGN (8); | |
27 | ' | |
28 | ||
29 | # Make _edata and .bss aligned by smuggling in an alignment directive. | |
30 | OTHER_GOT_SECTIONS='. = ALIGN (8);' | |
31 | ||
32 | CTOR_START='___ctors = .;' | |
33 | CTOR_END='___ctors_end = .;' | |
34 | DTOR_START='___dtors = .;' | |
35 | DTOR_END='___dtors_end = .;' | |
36 | ||
37 | # Do not use the varname=${varname-'string'} construct here; there are | |
38 | # problems with that on some shells (e.g. on Solaris) where there is a bug | |
39 | # that trigs when $varname contains a "}". | |
40 | test -z "$OTHER_RELOCATING_SECTIONS" && OTHER_RELOCATING_SECTIONS=' | |
41 | .cranges 0 : { *(.cranges) } | |
42 | ' | |
43 | ||
44 | # We need to adjust sizes in the .cranges section after relaxation, so | |
45 | # we need an after_allocation function, and it goes in this file. | |
46 | EXTRA_EM_FILE=${EXTRA_EM_FILE-sh64elf} |