binutils-gdb/ld/emulparams/elf_nacl.sh
Roland McGrath 8634c1b4cb 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.
2012-12-11 22:23:14 +00:00

15 lines
378 B
Bash

ENABLE_INITFINI_ARRAY=yes
SEPARATE_CODE=yes
TEXT_START_ADDR=0x20000
NACL_RODATA_DISTANCE=0x10000000
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`