Commit | Line | Data |
---|---|---|
465bc359 | 1 | # If you change this file, please also look at files which source this one: |
8d05742f | 2 | # shlelf.sh, shelf_nbsd.sh |
465bc359 | 3 | |
252b5132 RH |
4 | SCRIPT_NAME=elf |
5 | OUTPUT_FORMAT="elf32-sh" | |
6 | TEXT_START_ADDR=0x1000 | |
7 | MAXPAGESIZE=128 | |
8 | ARCH=sh | |
9 | MACHINE= | |
10 | TEMPLATE_NAME=elf32 | |
11 | GENERATE_SHLIB_SCRIPT=yes | |
12 | EMBEDDED=yes | |
13 | ||
14 | # These are for compatibility with the COFF toolchain. | |
15 | ENTRY=start | |
16 | CTOR_START='___ctors = .;' | |
17 | CTOR_END='___ctors_end = .;' | |
18 | DTOR_START='___dtors = .;' | |
19 | DTOR_END='___dtors_end = .;' | |
c38f024c | 20 | # This is like setting STACK_ADDR to 0x300000, except that the setting can |
164c4054 JR |
21 | # be overridden, e.g. --defsym _stack=0x0f00, and that we put an extra |
22 | # sentinal value at the bottom. | |
23 | # N.B. We can't use PROVIDE to set the default value in a symbol because | |
24 | # the address is needed to place the .stack section, which in turn is needed | |
25 | # to hold the sentinel value(s). | |
c38f024c | 26 | test -z "$CREATE_SHLIB" && OTHER_SECTIONS=" .stack ${RELOCATING-0}${RELOCATING+(DEFINED(_stack) ? _stack : 0x300000)} : |
164c4054 JR |
27 | { |
28 | ${RELOCATING+_stack = .;} | |
29 | *(.stack) | |
30 | LONG(0xdeaddead) | |
31 | }" | |
8a1cb159 KK |
32 | # We do not need .stack for shared library. |
33 | test -n "$CREATE_SHLIB" && OTHER_SECTIONS="" |