aboutsummaryrefslogtreecommitdiff
path: root/ld/emulparams
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2006-10-17 13:55:11 +0000
committerAlan Modra <amodra@gmail.com>2006-10-17 13:55:11 +0000
commit5a8e7be242f31a30e547d093ffe6065a038c99c2 (patch)
tree2fc2ee409c85a6f3c77e3a252cb8d6c9236b7fef /ld/emulparams
parent74541ad4c01323646d5bebe7ff10828f84af0f49 (diff)
downloadgdb-5a8e7be242f31a30e547d093ffe6065a038c99c2.zip
gdb-5a8e7be242f31a30e547d093ffe6065a038c99c2.tar.gz
gdb-5a8e7be242f31a30e547d093ffe6065a038c99c2.tar.bz2
* scripttempl/elf.sc (INTERP): Delete. Move definition to..
(INITIAL_READONLY_SECTIONS): ..here. * emulparams/criself.sh (INITIAL_READONLY_SECTIONS): Include .interp. * emulparams/elf32bmip.sh (INITIAL_READONLY_SECTIONS): Ditto. * emulparams/elf32bmipn32-defs.sh (INITIAL_READONLY_SECTIONS): Ditto.
Diffstat (limited to 'ld/emulparams')
-rw-r--r--ld/emulparams/criself.sh7
-rw-r--r--ld/emulparams/elf32bmip.sh6
-rw-r--r--ld/emulparams/elf32bmipn32-defs.sh7
3 files changed, 17 insertions, 3 deletions
diff --git a/ld/emulparams/criself.sh b/ld/emulparams/criself.sh
index 0478f34..1d374ae 100644
--- a/ld/emulparams/criself.sh
+++ b/ld/emulparams/criself.sh
@@ -13,7 +13,12 @@ ALIGNMENT=32
TEXT_START_ADDR=0
# Put crt0 for flash/eprom etc. in this section.
-INITIAL_READONLY_SECTIONS='.startup : { KEEP(*(.startup)) }'
+INITIAL_READONLY_SECTIONS=
+if test -z "${CREATE_SHLIB}"; then
+ INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
+fi
+INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
+ .startup : { KEEP(*(.startup)) }"
# Setting __Stext to . in TEXT_START_SYMBOLS doesn't get what we want
# most of the time, which is the start of all read-only sections;
diff --git a/ld/emulparams/elf32bmip.sh b/ld/emulparams/elf32bmip.sh
index 3501ddf..8fda60b 100644
--- a/ld/emulparams/elf32bmip.sh
+++ b/ld/emulparams/elf32bmip.sh
@@ -12,7 +12,11 @@ COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x0400000
SHLIB_TEXT_START_ADDR=0x5ffe0000
TEXT_DYNAMIC=
-INITIAL_READONLY_SECTIONS="
+INITIAL_READONLY_SECTIONS=
+if test -z "${CREATE_SHLIB}"; then
+ INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
+fi
+INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
.reginfo ${RELOCATING-0} : { *(.reginfo) }
"
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
diff --git a/ld/emulparams/elf32bmipn32-defs.sh b/ld/emulparams/elf32bmipn32-defs.sh
index 024aebe..4091ff4 100644
--- a/ld/emulparams/elf32bmipn32-defs.sh
+++ b/ld/emulparams/elf32bmipn32-defs.sh
@@ -57,7 +57,12 @@ TEXT_START_SYMBOLS='_ftext = . ;'
DATA_START_SYMBOLS='_fdata = . ;'
OTHER_BSS_SYMBOLS='_fbss = .;'
-INITIAL_READONLY_SECTIONS=".reginfo ${RELOCATING-0} : { *(.reginfo) }"
+INITIAL_READONLY_SECTIONS=
+if test -z "${CREATE_SHLIB}"; then
+ INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
+fi
+INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
+ .reginfo ${RELOCATING-0} : { *(.reginfo) }"
# Discard any .MIPS.content* or .MIPS.events* sections. The linker
# doesn't know how to adjust them.
OTHER_SECTIONS="/DISCARD/ : { *(.MIPS.content*) *(.MIPS.events*) }"