aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorJie Zhang <jie.zhang@analog.com>2009-09-01 02:54:10 +0000
committerJie Zhang <jie.zhang@analog.com>2009-09-01 02:54:10 +0000
commit8d17e044d8743a01ad2d3348e9c737cd843d80bf (patch)
treefdbee99d54d5192a335f01ea9f2e24873894c1bd /ld
parent5e8c8f8f89533ff627f6d73391c712604bf705ee (diff)
downloadgdb-8d17e044d8743a01ad2d3348e9c737cd843d80bf.zip
gdb-8d17e044d8743a01ad2d3348e9c737cd843d80bf.tar.gz
gdb-8d17e044d8743a01ad2d3348e9c737cd843d80bf.tar.bz2
* scripttempl/elf.sc: Add ${USER_LABEL_PREFIX} to _start, etext,
_stack and __bss_start. * emulparams/bfin.sh (ENTRY): Remove.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog6
-rwxr-xr-xld/emulparams/bfin.sh1
-rw-r--r--ld/scripttempl/elf.sc8
3 files changed, 10 insertions, 5 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 034fe52..18344c7 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2009-09-01 Jie Zhang <jie.zhang@analog.com>
+
+ * scripttempl/elf.sc: Add ${USER_LABEL_PREFIX} to _start, etext,
+ _stack and __bss_start.
+ * emulparams/bfin.sh (ENTRY): Remove.
+
2009-08-30 Alan Modra <amodra@bigpond.net.au>
PR ld/10569
diff --git a/ld/emulparams/bfin.sh b/ld/emulparams/bfin.sh
index 1c764e8..3de8921 100755
--- a/ld/emulparams/bfin.sh
+++ b/ld/emulparams/bfin.sh
@@ -5,7 +5,6 @@ MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
TARGET_PAGE_SIZE=0x1000
ARCH=bfin
MACHINE=
-ENTRY=__start
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
EMBEDDED=yes
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
index b3aea40..d5cc3e6 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
@@ -89,14 +89,14 @@
#
# Each of these can also have corresponding .rel.* and .rela.* sections.
-test -z "$ENTRY" && ENTRY=_start
+test -z "$ENTRY" && ENTRY=${USER_LABEL_PREFIX}_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=.
-test -z "${ETEXT_NAME}" && ETEXT_NAME=etext
+test -z "${ETEXT_NAME}" && ETEXT_NAME=${USER_LABEL_PREFIX}etext
test -n "$CREATE_SHLIB$CREATE_PIE" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE=""
test -z "$CREATE_SHLIB$CREATE_PIE" && test -n "$DATA_ADDR" && COMMONPAGESIZE=""
test -n "$RELRO_NOW" && unset SEPARATE_GOTPLT
@@ -254,7 +254,7 @@ DTOR=".dtors ${CONSTRUCTING-0} :
}"
STACK=" .stack ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} :
{
- ${RELOCATING+_stack = .;}
+ ${RELOCATING+${USER_LABEL_PREFIX}_stack = .;}
*(.stack)
}"
@@ -501,7 +501,7 @@ cat <<EOF
${SDATA}
${OTHER_SDATA_SECTIONS}
${RELOCATING+${DATA_END_SYMBOLS-${USER_LABEL_PREFIX}_edata = .; PROVIDE (${USER_LABEL_PREFIX}edata = .);}}
- ${RELOCATING+__bss_start = .;}
+ ${RELOCATING+${USER_LABEL_PREFIX}__bss_start = .;}
${RELOCATING+${OTHER_BSS_SYMBOLS}}
${SBSS}
${BSS_PLT+${PLT}}