From 4e5db43bfad4c4f2db529fcbfda195b01befa441 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Thu, 10 Feb 2005 05:49:21 +0000 Subject: [PATCH] * scripttempl/armbpabi.sc (VERSION): Make special section symbols local. (Image$$ER_RO$$Base): Define whenever RELOCATING. (Image$$ER_RO$$Limit): Likewise. (SHT$$INIT_ARRAY$$Base): Likewise. (SHT$$INIT_ARRAY$$Limit): Likeise. --- ld/ChangeLog | 9 +++++++++ ld/scripttempl/armbpabi.sc | 34 +++++++++++++++++++++++++++++----- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 9a5824b..82d9b1c 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,12 @@ +2005-02-08 Mark Mitchell + + * scripttempl/armbpabi.sc (VERSION): Make special section symbols + local. + (Image$$ER_RO$$Base): Define whenever RELOCATING. + (Image$$ER_RO$$Limit): Likewise. + (SHT$$INIT_ARRAY$$Base): Likewise. + (SHT$$INIT_ARRAY$$Limit): Likeise. + 2005-02-10 Ben Elliston * emultempl/beos.em: Remove #if 0 and #if 1 blocks. diff --git a/ld/scripttempl/armbpabi.sc b/ld/scripttempl/armbpabi.sc index b98f077..589a9e5 100644 --- a/ld/scripttempl/armbpabi.sc +++ b/ld/scripttempl/armbpabi.sc @@ -134,15 +134,37 @@ ${RELOCATING- /* For some reason, the Solaris linker makes bad executables at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld bug. But for now assigning the zero vmas works. */} +/* ARM's proprietary toolchain generate these symbols to match the start + and end of particular sections of the image. SymbianOS uses these + symbols. We provide them for compatibility with ARM's toolchains. + These symbols should be bound locally; each shared object may define + its own version of these symbols. */ + +VERSION +{ + { + local: + Image\$\$ER_RO\$\$Base; + Image\$\$ER_RO\$\$Limit; + SHT\$\$INIT_ARRAY\$\$Base; + SHT\$\$INIT_ARRAY\$\$Limit; + .ARM.exidx\$\$Base; + .ARM.exidx\$\$Limit; + }; +} + SECTIONS { /* Read-only sections, merged into text segment: */ ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR});}}} - /* SymbianOS uses this symbol. */ - ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (Image\$\$ER_RO\$\$Base = ${TEXT_START_ADDR});}}} + ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+ . = ${TEXT_BASE_ADDRESS};}}} ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_BASE_ADDRESS};}} ${CREATE_PIE+${RELOCATING+. = ${SHLIB_BASE_ADDRESS};}} + + /* Define Image\$\$ER_RO\$\$Base. */ + ${RELOCATING+PROVIDE (Image\$\$ER_RO\$\$Base = .);} + ${INITIAL_READONLY_SECTIONS} EOF @@ -174,8 +196,10 @@ cat <