aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorTom Rix <trix@redhat.com>2002-06-17 14:08:40 +0000
committerTom Rix <trix@redhat.com>2002-06-17 14:08:40 +0000
commit8243435612b508460efea333197bf662c403e652 (patch)
treee43144fbc2ef67875d39031989a5f871e0124dd3 /ld
parent4c0b7915d432a3695d945ac7b9f076e66a6e6baa (diff)
downloadgdb-8243435612b508460efea333197bf662c403e652.zip
gdb-8243435612b508460efea333197bf662c403e652.tar.gz
gdb-8243435612b508460efea333197bf662c403e652.tar.bz2
Fix ld segfault for some elf targets. Fix default layout for d10v.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog7
-rw-r--r--ld/emulparams/d10velf.sh2
-rw-r--r--ld/emultempl/elf32.em4
-rw-r--r--ld/scripttempl/elfd10v.sc6
4 files changed, 15 insertions, 4 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 071d22f..5c193fb 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,10 @@
+2002-06-17 Tom Rix <trix@redhat.com>
+
+ * emultempl/elf32.em: gld*_get_script: Check for
+ GENERATE_COMBRELOC_SCRIPT.
+ * scripttempl/elfd10v.sc : Fix STACK and INSN.
+ * emulparams/d10velf.sh : Fix TEXT_START_ADDR.
+
Thu Jun 13 20:18:38 2002 J"orn Rennecke <joern.rennecke@superh.com>
* configure.tgt: Add support for sh[1234]*le*-*-elf, sh[1234]*-*-elf.
diff --git a/ld/emulparams/d10velf.sh b/ld/emulparams/d10velf.sh
index c8c4214..c8de5c4 100644
--- a/ld/emulparams/d10velf.sh
+++ b/ld/emulparams/d10velf.sh
@@ -1,7 +1,7 @@
MACHINE=
SCRIPT_NAME=elfd10v
OUTPUT_FORMAT="elf32-d10v"
-TEXT_START_ADDR=0x01000000
+TEXT_START_ADDR=0x01014000
READONLY_START_ADDR=0x02000004
ARCH=d10v
MAXPAGESIZE=32
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index cfd0409..58a1ccc 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -1383,13 +1383,17 @@ echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}
sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
fi
if test -n "$GENERATE_SHLIB_SCRIPT" ; then
+if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
echo ' ; else if (link_info.shared && link_info.combreloc) return' >> e${EMULATION_NAME}.c
sed $sc ldscripts/${EMULATION_NAME}.xsc >> e${EMULATION_NAME}.c
+fi
echo ' ; else if (link_info.shared) return' >> e${EMULATION_NAME}.c
sed $sc ldscripts/${EMULATION_NAME}.xs >> e${EMULATION_NAME}.c
fi
+if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
echo ' ; else if (link_info.combreloc) return' >> e${EMULATION_NAME}.c
sed $sc ldscripts/${EMULATION_NAME}.xc >> e${EMULATION_NAME}.c
+fi
echo ' ; else return' >> e${EMULATION_NAME}.c
sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
echo '; }' >> e${EMULATION_NAME}.c
diff --git a/ld/scripttempl/elfd10v.sc b/ld/scripttempl/elfd10v.sc
index ef57c81..f9acf6c 100644
--- a/ld/scripttempl/elfd10v.sc
+++ b/ld/scripttempl/elfd10v.sc
@@ -66,14 +66,14 @@ ${RELOCATING+${EXECUTABLE_SYMBOLS}}
MEMORY
{
UNIFIED : org = 0, len = 0x1000000
- INSN : org = 0x1000000, len = 0x40000
+ INSN : org = 0x1014000, len = 0x40000
DATA : org = 0x2000004, len = 0x7FFC
- STACK : org = 0x2007FFE, len = 4
+ STACK : org = 0x200BFFE, len = 4
}
SECTIONS
{
- .text :
+ .text ${RELOCATING+${TEXT_START_ADDR}} :
{
${RELOCATING+${TEXT_START_SYMBOLS}}
KEEP (*(.init))