aboutsummaryrefslogtreecommitdiff
path: root/ld/emulparams
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2012-12-11 22:23:14 +0000
committerRoland McGrath <roland@gnu.org>2012-12-11 22:23:14 +0000
commit8634c1b4cb6d2531d1a7f068543bb61850099a1e (patch)
tree50605e0be156302c753c9b989c89f3ab3bc55364 /ld/emulparams
parent2960a434c3403a088a3491b12cd3e79cbd641966 (diff)
downloadgdb-8634c1b4cb6d2531d1a7f068543bb61850099a1e.zip
gdb-8634c1b4cb6d2531d1a7f068543bb61850099a1e.tar.gz
gdb-8634c1b4cb6d2531d1a7f068543bb61850099a1e.tar.bz2
ld/
* emulparams/elf_nacl.sh (nacl_rodata_addr): New shell function. (RODATA_ADDR, SHLIB_RODATA_ADDR): Use it to base the calculation on SEGMENT_START("text-segment", ...) rather than ... alone. * Makefile.am (earmelf_nacl.c, earmelfb_nacl.c): Add missing dependency on $(srcdir)/emulparams/elf_nacl.sh. * Makefile.in: Regenerate.
Diffstat (limited to 'ld/emulparams')
-rw-r--r--ld/emulparams/elf_nacl.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/ld/emulparams/elf_nacl.sh b/ld/emulparams/elf_nacl.sh
index 0073c0f..657cd06 100644
--- a/ld/emulparams/elf_nacl.sh
+++ b/ld/emulparams/elf_nacl.sh
@@ -2,5 +2,13 @@ ENABLE_INITFINI_ARRAY=yes
SEPARATE_CODE=yes
TEXT_START_ADDR=0x20000
NACL_RODATA_DISTANCE=0x10000000
-RODATA_ADDR="${TEXT_START_ADDR} + ${NACL_RODATA_DISTANCE} + SIZEOF_HEADERS"
-SHLIB_RODATA_ADDR="${NACL_RODATA_DISTANCE} + SIZEOF_HEADERS"
+
+nacl_rodata_addr()
+{
+ nacl_text_addr="SEGMENT_START(\"text-segment\", $1)"
+ nacl_rodata_addr="$nacl_text_addr + ${NACL_RODATA_DISTANCE} + SIZEOF_HEADERS"
+ echo "$nacl_rodata_addr"
+}
+
+RODATA_ADDR=`nacl_rodata_addr "${TEXT_START_ADDR}"`
+SHLIB_RODATA_ADDR=`nacl_rodata_addr 0`