From 020c70e98ea4ffe1deac68e16ec708f2738b7c54 Mon Sep 17 00:00:00 2001 From: Catherine Moore Date: Sat, 1 Aug 1998 17:30:02 +0000 Subject: [PATCH] * scripttempl/elfarm.sc: New file. * emulparams/armelf.sh: Set SCRIPT_NAME to elfarm. --- ld/ChangeLog | 7 + ld/scripttempl/elfarm.sc | 267 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 274 insertions(+) create mode 100644 ld/scripttempl/elfarm.sc diff --git a/ld/ChangeLog b/ld/ChangeLog index 086b76cab64..d11fcb9a29d 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,4 +1,11 @@ start-sanitize-armelf +Sat Aug 1 11:47:37 1998 Catherine Moore + + * scripttempl/elfarm.sc: New file. + * emulparams/armelf.sh: Set SCRIPT_NAME to elfarm. + +end-sanitize-armelf +start-sanitize-armelf Fri Jul 31 15:56:16 1998 Catherine Moore * emulparams/armelf.sh: New file. diff --git a/ld/scripttempl/elfarm.sc b/ld/scripttempl/elfarm.sc new file mode 100644 index 00000000000..9e97ad1bc7c --- /dev/null +++ b/ld/scripttempl/elfarm.sc @@ -0,0 +1,267 @@ +/* start-sanitize-armelf */ +# +# Unusual variables checked by this code: +# NOP - two byte opcode for no-op (defaults to 0) +# DATA_ADDR - if end-of-text-plus-one-page isn't right for data start +# INITIAL_READONLY_SECTIONS - at start of text segment +# OTHER_READONLY_SECTIONS - other than .text .init .rodata ... +# (e.g., .PARISC.milli) +# OTHER_TEXT_SECTIONS - these get put in .text when relocating +# OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ... +# (e.g., .PARISC.global) +# OTHER_SECTIONS - at the end +# EXECUTABLE_SYMBOLS - symbols that must be defined for an +# executable (e.g., _DYNAMIC_LINK) +# TEXT_START_SYMBOLS - symbols that appear at the start of the +# .text section. +# DATA_START_SYMBOLS - symbols that appear at the start of the +# .data section. +# OTHER_GOT_SYMBOLS - symbols defined just before .got. +# OTHER_GOT_SECTIONS - sections just after .got and .sdata. +# OTHER_BSS_SYMBOLS - symbols that appear at the start of the +# .bss section besides __bss_start. +# DATA_PLT - .plt should be in data segment, not text segment. +# TEXT_DYNAMIC - .dynamic in text segment, not data segment. +# EMBEDDED - whether this is for an embedded system. +# SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set +# start address of shared library. +# INPUT_FILES - INPUT command of files to always include +# +# When adding sections, do note that the names of some sections are used +# when specifying the start address of the next. +# + +test -z "$ENTRY" && ENTRY=_start +test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT} +test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT} +if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi +test -z "${ELFSIZE}" && ELFSIZE=32 +test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8" +test "$LD_FLAG" = "N" && DATA_ADDR=. +INTERP=".interp ${RELOCATING-0} : { *(.interp) }" +PLT=".plt ${RELOCATING-0} : { *(.plt) }" +DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }" + +# if this is for an embedded system, don't add SIZEOF_HEADERS. +if [ -z "$EMBEDDED" ]; then + test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR} + SIZEOF_HEADERS" +else + test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR}" +fi + +cat <