1130561Sobrien# If you change this file, please also look at files which source this one:
2130561Sobrien# elf32b4300.sh elf32bsmip.sh elf32btsmip.sh elf32ebmip.sh elf32lmip.sh
3218822Sdim# elf32ebmipvxworks.sh elf32elmipvxworks.sh
4130561Sobrien
5130561SobrienSCRIPT_NAME=elf
6130561SobrienOUTPUT_FORMAT="elf32-bigmips"
7130561SobrienBIG_OUTPUT_FORMAT="elf32-bigmips"
8130561SobrienLITTLE_OUTPUT_FORMAT="elf32-littlemips"
9130561SobrienTEXT_START_ADDR=0x0400000
10130561Sobrientest -n "${EMBEDDED}" || DATA_ADDR=0x10000000
11218822SdimMAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
12218822SdimCOMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
13130561SobrienNONPAGED_TEXT_START_ADDR=0x0400000
14130561SobrienSHLIB_TEXT_START_ADDR=0x5ffe0000
15218822SdimTEXT_DYNAMIC=
16218822SdimINITIAL_READONLY_SECTIONS=
17218822Sdimif test -z "${CREATE_SHLIB}"; then
18218822Sdim  INITIAL_READONLY_SECTIONS=".interp       ${RELOCATING-0} : { *(.interp) }"
19218822Sdimfi
20218822SdimINITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
21130561Sobrien  .reginfo      ${RELOCATING-0} : { *(.reginfo) }
22130561Sobrien"
23130561SobrienOTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
24218822Sdim# Unlike most targets, the MIPS backend puts all dynamic relocations
25218822Sdim# in a single dynobj section, which it also calls ".rel.dyn".  It does
26218822Sdim# this so that it can easily sort all dynamic relocations before the
27218822Sdim# output section has been populated.
28218822SdimOTHER_GOT_RELOC_SECTIONS="
29218822Sdim  .rel.dyn      ${RELOCATING-0} : { *(.rel.dyn) }
30218822Sdim"
31218822Sdim# If the output has a GOT section, there must be exactly 0x7ff0 bytes
32218822Sdim# between .got and _gp.  The ". = ." below stops the orphan code from
33218822Sdim# inserting other sections between the assignment to _gp and the start
34218822Sdim# of .got.
35130561SobrienOTHER_GOT_SYMBOLS='
36218822Sdim  . = .;
37130561Sobrien  _gp = ALIGN(16) + 0x7ff0;
38130561Sobrien'
39130561SobrienOTHER_SDATA_SECTIONS="
40130561Sobrien  .lit8         ${RELOCATING-0} : { *(.lit8) }
41130561Sobrien  .lit4         ${RELOCATING-0} : { *(.lit4) }
42130561Sobrien"
43130561SobrienTEXT_START_SYMBOLS='_ftext = . ;'
44130561SobrienDATA_START_SYMBOLS='_fdata = . ;'
45130561SobrienOTHER_BSS_SYMBOLS='_fbss = .;'
46130561SobrienOTHER_SECTIONS='
47130561Sobrien  .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
48130561Sobrien  .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
49218822Sdim  .mdebug.abi32 : { KEEP(*(.mdebug.abi32)) }
50218822Sdim  .mdebug.abiN32 : { KEEP(*(.mdebug.abiN32)) }
51218822Sdim  .mdebug.abi64 : { KEEP(*(.mdebug.abi64)) }
52218822Sdim  .mdebug.abiO64 : { KEEP(*(.mdebug.abiO64)) }
53218822Sdim  .mdebug.eabi32 : { KEEP(*(.mdebug.eabi32)) }
54218822Sdim  .mdebug.eabi64 : { KEEP(*(.mdebug.eabi64)) }
55218822Sdim  .gcc_compiled_long32 : { KEEP(*(.gcc_compiled_long32)) }
56218822Sdim  .gcc_compiled_long64 : { KEEP(*(.gcc_compiled_long64)) }
57130561Sobrien'
58130561SobrienARCH=mips
59130561SobrienMACHINE=
60130561SobrienTEMPLATE_NAME=elf32
61130561SobrienEXTRA_EM_FILE=mipself
62130561SobrienGENERATE_SHLIB_SCRIPT=yes
63218822SdimGENERATE_PIE_SCRIPT=yes
64