Blame ld/emulparams/elf32bmip.sh

Packit ba3681
# If you change this file, please also look at files which source this one:
Packit ba3681
# elf32b4300.sh elf32bsmip.sh elf32btsmip.sh elf32ebmip.sh elf32lmip.sh
Packit ba3681
# elf32ebmipvxworks.sh elf32elmipvxworks.sh
Packit ba3681
Packit ba3681
SCRIPT_NAME=elf
Packit ba3681
OUTPUT_FORMAT="elf32-bigmips"
Packit ba3681
BIG_OUTPUT_FORMAT="elf32-bigmips"
Packit ba3681
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
Packit ba3681
TEXT_START_ADDR=0x0400000
Packit ba3681
test -n "${EMBEDDED}" || DATA_ADDR=0x10000000
Packit ba3681
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
Packit ba3681
COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
Packit ba3681
SHLIB_TEXT_START_ADDR=0x5ffe0000
Packit ba3681
TEXT_DYNAMIC=
Packit ba3681
INITIAL_READONLY_SECTIONS=
Packit ba3681
if test -z "${CREATE_SHLIB}"; then
Packit ba3681
  INITIAL_READONLY_SECTIONS=".interp       ${RELOCATING-0} : { *(.interp) }"
Packit ba3681
fi
Packit ba3681
INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
Packit ba3681
  .MIPS.abiflags ${RELOCATING-0} : { *(.MIPS.abiflags) }
Packit ba3681
  .reginfo       ${RELOCATING-0} : { *(.reginfo) }
Packit ba3681
"
Packit ba3681
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
Packit ba3681
# Unlike most targets, the MIPS backend puts all dynamic relocations
Packit ba3681
# in a single dynobj section, which it also calls ".rel.dyn".  It does
Packit ba3681
# this so that it can easily sort all dynamic relocations before the
Packit ba3681
# output section has been populated.
Packit ba3681
OTHER_GOT_RELOC_SECTIONS="
Packit ba3681
  .rel.dyn      ${RELOCATING-0} : { *(.rel.dyn) }
Packit ba3681
"
Packit ba3681
# If the output has a GOT section, there must be exactly 0x7ff0 bytes
Packit ba3681
# between .got and _gp.  The ". = ." below stops the orphan code from
Packit ba3681
# inserting other sections between the assignment to _gp and the start
Packit ba3681
# of .got.
Packit ba3681
OTHER_GOT_SYMBOLS='
Packit ba3681
  . = .;
Packit ba3681
  HIDDEN (_gp = ALIGN (16) + 0x7ff0);
Packit ba3681
'
Packit ba3681
# .got.plt is only used for the PLT psABI extension.  It should not be
Packit ba3681
# included in the .sdata block with .got, as there is no need to access
Packit ba3681
# the section from _gp.  Note that the traditional:
Packit ba3681
#
Packit ba3681
#      . = .
Packit ba3681
#      _gp = ALIGN (16) + 0x7ff0;
Packit ba3681
#      .got : { *(.got.plt) *(.got) }
Packit ba3681
#
Packit ba3681
# would set _gp to the wrong value; _gp - 0x7ff0 must point to the start
Packit ba3681
# of *(.got).
Packit ba3681
GOT=".got          ${RELOCATING-0} : { *(.got) }"
Packit ba3681
unset OTHER_READWRITE_SECTIONS
Packit ba3681
unset OTHER_RELRO_SECTIONS
Packit ba3681
if test -n "$RELRO_NOW"; then
Packit ba3681
  OTHER_RELRO_SECTIONS=".got.plt      ${RELOCATING-0} : { *(.got.plt) }"
Packit ba3681
else
Packit ba3681
  OTHER_READWRITE_SECTIONS=".got.plt      ${RELOCATING-0} : { *(.got.plt) }"
Packit ba3681
fi
Packit ba3681
Packit ba3681
OTHER_SDATA_SECTIONS="
Packit ba3681
  .lit8         ${RELOCATING-0} : { *(.lit8) }
Packit ba3681
  .lit4         ${RELOCATING-0} : { *(.lit4) }
Packit ba3681
"
Packit ba3681
TEXT_START_SYMBOLS='_ftext = . ;'
Packit ba3681
DATA_START_SYMBOLS='_fdata = . ;'
Packit ba3681
OTHER_BSS_SYMBOLS='_fbss = .;'
Packit ba3681
OTHER_SECTIONS='
Packit ba3681
  .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
Packit ba3681
  .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
Packit ba3681
  .mdebug.abi32 0 : { KEEP(*(.mdebug.abi32)) }
Packit ba3681
  .mdebug.abiN32 0 : { KEEP(*(.mdebug.abiN32)) }
Packit ba3681
  .mdebug.abi64 0 : { KEEP(*(.mdebug.abi64)) }
Packit ba3681
  .mdebug.abiO64 0 : { KEEP(*(.mdebug.abiO64)) }
Packit ba3681
  .mdebug.eabi32 0 : { KEEP(*(.mdebug.eabi32)) }
Packit ba3681
  .mdebug.eabi64 0 : { KEEP(*(.mdebug.eabi64)) }
Packit ba3681
  .gcc_compiled_long32 0 : { KEEP(*(.gcc_compiled_long32)) }
Packit ba3681
  .gcc_compiled_long64 0 : { KEEP(*(.gcc_compiled_long64)) }
Packit ba3681
'
Packit ba3681
ARCH=mips
Packit ba3681
MACHINE=
Packit ba3681
TEMPLATE_NAME=elf32
Packit ba3681
EXTRA_EM_FILE=mipself
Packit ba3681
GENERATE_SHLIB_SCRIPT=yes
Packit ba3681
GENERATE_PIE_SCRIPT=yes