From e78c4c7ea8ad3d53902aa5e23f414ee06d150880 Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Mon, 3 Nov 2008 18:52:52 +0000 Subject: [PATCH] * emulparams/elf32xtensa.sh (NO_REL_RELOCS): Set. * scripttempl/elfxtensa.sc (NO_REL_RELOCS, NO_RELA_RELOCS) (NON_ALLOC_DYN): Import changes from elf.sc. --- ld/ChangeLog | 6 ++++ ld/emulparams/elf32xtensa.sh | 1 + ld/scripttempl/elfxtensa.sc | 58 +++++++++++++++++++++++++++++++----- 3 files changed, 57 insertions(+), 8 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 3fec7a592e8..8c40f0e252b 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2008-11-03 Bob Wilson + + * emulparams/elf32xtensa.sh (NO_REL_RELOCS): Set. + * scripttempl/elfxtensa.sc (NO_REL_RELOCS, NO_RELA_RELOCS) + (NON_ALLOC_DYN): Import changes from elf.sc. + 2008-10-25 Nick Clifton PR 6945 diff --git a/ld/emulparams/elf32xtensa.sh b/ld/emulparams/elf32xtensa.sh index c5c522ad9f2..72ba2bb7806 100644 --- a/ld/emulparams/elf32xtensa.sh +++ b/ld/emulparams/elf32xtensa.sh @@ -4,6 +4,7 @@ EXTRA_EM_FILE=xtensaelf OUTPUT_FORMAT=undefined BIG_OUTPUT_FORMAT="elf32-xtensa-be" LITTLE_OUTPUT_FORMAT="elf32-xtensa-le" +NO_REL_RELOCS=yes TEXT_START_ADDR=0x400000 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" ARCH=xtensa diff --git a/ld/scripttempl/elfxtensa.sc b/ld/scripttempl/elfxtensa.sc index 368b1cd6fa1..df3ed8e9e82 100644 --- a/ld/scripttempl/elfxtensa.sc +++ b/ld/scripttempl/elfxtensa.sc @@ -36,6 +36,9 @@ # DATA_PLT - .plt should be in data segment, not text segment. # PLT_BEFORE_GOT - .plt just before .got when .plt is in data segement. # BSS_PLT - .plt should be in bss segment +# NO_REL_RELOCS - Don't include .rel.* sections in script +# NO_RELA_RELOCS - Don't include .rela.* sections in script +# NON_ALLOC_DYN - Place dynamic sections after data 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 @@ -282,6 +285,11 @@ SECTIONS ${CREATE_PIE+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}} ${INITIAL_READONLY_SECTIONS} .note.gnu.build-id : { *(.note.gnu.build-id) } +EOF + +test -n "${RELOCATING+0}" || unset NON_ALLOC_DYN +test -z "${NON_ALLOC_DYN}" || TEXT_DYNAMIC= +cat > ldscripts/dyntmp.$$ <> ldscripts/dyntmp.$$ <> ldscripts/dyntmp.$$ +cat >> ldscripts/dyntmp.$$ <> ldscripts/dyntmp.$$ +cat >> ldscripts/dyntmp.$$ <> ldscripts/dyntmp.$$ <