mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-18 22:13:40 +08:00
* emulparams/elf32xtensa.sh (NO_REL_RELOCS): Set.
* scripttempl/elfxtensa.sc (NO_REL_RELOCS, NO_RELA_RELOCS) (NON_ALLOC_DYN): Import changes from elf.sc.
This commit is contained in:
parent
9bc9e92779
commit
e78c4c7ea8
@ -1,3 +1,9 @@
|
|||||||
|
2008-11-03 Bob Wilson <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 <nickc@redhat.com>
|
2008-10-25 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
PR 6945
|
PR 6945
|
||||||
|
@ -4,6 +4,7 @@ EXTRA_EM_FILE=xtensaelf
|
|||||||
OUTPUT_FORMAT=undefined
|
OUTPUT_FORMAT=undefined
|
||||||
BIG_OUTPUT_FORMAT="elf32-xtensa-be"
|
BIG_OUTPUT_FORMAT="elf32-xtensa-be"
|
||||||
LITTLE_OUTPUT_FORMAT="elf32-xtensa-le"
|
LITTLE_OUTPUT_FORMAT="elf32-xtensa-le"
|
||||||
|
NO_REL_RELOCS=yes
|
||||||
TEXT_START_ADDR=0x400000
|
TEXT_START_ADDR=0x400000
|
||||||
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
|
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
|
||||||
ARCH=xtensa
|
ARCH=xtensa
|
||||||
|
@ -36,6 +36,9 @@
|
|||||||
# DATA_PLT - .plt should be in data segment, not text segment.
|
# DATA_PLT - .plt should be in data segment, not text segment.
|
||||||
# PLT_BEFORE_GOT - .plt just before .got when .plt is in data segement.
|
# PLT_BEFORE_GOT - .plt just before .got when .plt is in data segement.
|
||||||
# BSS_PLT - .plt should be in bss segment
|
# 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.
|
# TEXT_DYNAMIC - .dynamic in text segment, not data segment.
|
||||||
# EMBEDDED - whether this is for an embedded system.
|
# EMBEDDED - whether this is for an embedded system.
|
||||||
# SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
|
# 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;}}
|
${CREATE_PIE+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
|
||||||
${INITIAL_READONLY_SECTIONS}
|
${INITIAL_READONLY_SECTIONS}
|
||||||
.note.gnu.build-id : { *(.note.gnu.build-id) }
|
.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.$$ <<EOF
|
||||||
${TEXT_DYNAMIC+${DYNAMIC}}
|
${TEXT_DYNAMIC+${DYNAMIC}}
|
||||||
.hash ${RELOCATING-0} : { *(.hash) }
|
.hash ${RELOCATING-0} : { *(.hash) }
|
||||||
.gnu.hash ${RELOCATING-0} : { *(.gnu.hash) }
|
.gnu.hash ${RELOCATING-0} : { *(.gnu.hash) }
|
||||||
@ -290,10 +298,10 @@ SECTIONS
|
|||||||
.gnu.version ${RELOCATING-0} : { *(.gnu.version) }
|
.gnu.version ${RELOCATING-0} : { *(.gnu.version) }
|
||||||
.gnu.version_d ${RELOCATING-0}: { *(.gnu.version_d) }
|
.gnu.version_d ${RELOCATING-0}: { *(.gnu.version_d) }
|
||||||
.gnu.version_r ${RELOCATING-0}: { *(.gnu.version_r) }
|
.gnu.version_r ${RELOCATING-0}: { *(.gnu.version_r) }
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [ "x$COMBRELOC" = x ]; then
|
if [ "x$COMBRELOC" = x ]; then
|
||||||
COMBRELOCCAT=cat
|
COMBRELOCCAT="cat >> ldscripts/dyntmp.$$"
|
||||||
else
|
else
|
||||||
COMBRELOCCAT="cat > $COMBRELOC"
|
COMBRELOCCAT="cat > $COMBRELOC"
|
||||||
fi
|
fi
|
||||||
@ -330,27 +338,45 @@ eval $COMBRELOCCAT <<EOF
|
|||||||
.rela.bss ${RELOCATING-0} : { *(.rela.bss${RELOCATING+ .rela.bss.* .rela.gnu.linkonce.b.*}) }
|
.rela.bss ${RELOCATING-0} : { *(.rela.bss${RELOCATING+ .rela.bss.* .rela.gnu.linkonce.b.*}) }
|
||||||
${REL_LARGE}
|
${REL_LARGE}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [ -n "$COMBRELOC" ]; then
|
if [ -n "$COMBRELOC" ]; then
|
||||||
cat <<EOF
|
cat >> ldscripts/dyntmp.$$ <<EOF
|
||||||
.rel.dyn ${RELOCATING-0} :
|
.rel.dyn ${RELOCATING-0} :
|
||||||
{
|
{
|
||||||
EOF
|
EOF
|
||||||
sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
|
sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
|
||||||
cat <<EOF
|
cat >> ldscripts/dyntmp.$$ <<EOF
|
||||||
}
|
}
|
||||||
.rela.dyn ${RELOCATING-0} :
|
.rela.dyn ${RELOCATING-0} :
|
||||||
{
|
{
|
||||||
EOF
|
EOF
|
||||||
sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
|
sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$
|
||||||
cat <<EOF
|
cat >> ldscripts/dyntmp.$$ <<EOF
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
cat <<EOF
|
|
||||||
|
cat >> ldscripts/dyntmp.$$ <<EOF
|
||||||
.rel.plt ${RELOCATING-0} : { *(.rel.plt) }
|
.rel.plt ${RELOCATING-0} : { *(.rel.plt) }
|
||||||
.rela.plt ${RELOCATING-0} : { *(.rela.plt) }
|
.rela.plt ${RELOCATING-0} : { *(.rela.plt) }
|
||||||
${OTHER_PLT_RELOC_SECTIONS}
|
${OTHER_PLT_RELOC_SECTIONS}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if test -z "${NON_ALLOC_DYN}"; then
|
||||||
|
if test -z "${NO_REL_RELOCS}${NO_RELA_RELOCS}"; then
|
||||||
|
cat ldscripts/dyntmp.$$
|
||||||
|
else
|
||||||
|
if test -z "${NO_REL_RELOCS}"; then
|
||||||
|
sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$
|
||||||
|
fi
|
||||||
|
if test -z "${NO_RELA_RELOCS}"; then
|
||||||
|
sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
rm -f ldscripts/dyntmp.$$
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
${RELOCATING-$INIT_LIT}
|
${RELOCATING-$INIT_LIT}
|
||||||
${RELOCATING-$INIT}
|
${RELOCATING-$INIT}
|
||||||
|
|
||||||
@ -484,7 +510,23 @@ cat <<EOF
|
|||||||
${RELOCATING+${OTHER_END_SYMBOLS}}
|
${RELOCATING+${OTHER_END_SYMBOLS}}
|
||||||
${RELOCATING+${END_SYMBOLS-${USER_LABEL_PREFIX}_end = .; PROVIDE (${USER_LABEL_PREFIX}end = .);}}
|
${RELOCATING+${END_SYMBOLS-${USER_LABEL_PREFIX}_end = .; PROVIDE (${USER_LABEL_PREFIX}end = .);}}
|
||||||
${RELOCATING+${DATA_SEGMENT_END}}
|
${RELOCATING+${DATA_SEGMENT_END}}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if test -n "${NON_ALLOC_DYN}"; then
|
||||||
|
if test -z "${NO_REL_RELOCS}${NO_RELA_RELOCS}"; then
|
||||||
|
cat ldscripts/dyntmp.$$
|
||||||
|
else
|
||||||
|
if test -z "${NO_REL_RELOCS}"; then
|
||||||
|
sed -e '/^[ ]*\.rela\.[^}]*$/,/}/d' -e '/^[ ]*\.rela\./d' ldscripts/dyntmp.$$
|
||||||
|
fi
|
||||||
|
if test -z "${NO_RELA_RELOCS}"; then
|
||||||
|
sed -e '/^[ ]*\.rel\.[^}]*$/,/}/d' -e '/^[ ]*\.rel\./d' ldscripts/dyntmp.$$
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
rm -f ldscripts/dyntmp.$$
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
/* Stabs debugging sections. */
|
/* Stabs debugging sections. */
|
||||||
.stab 0 : { *(.stab) }
|
.stab 0 : { *(.stab) }
|
||||||
.stabstr 0 : { *(.stabstr) }
|
.stabstr 0 : { *(.stabstr) }
|
||||||
|
Loading…
Reference in New Issue
Block a user