From: Bob Wilson Date: Thu, 3 May 2007 19:31:03 +0000 (+0000) Subject: * scripttempl/elfxtensa.sc: Merge changes from elf.sc. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=b6318b18f9d0a619404920efee48df6e9a6ec6b4;p=pf3gnuchains%2Fpf3gnuchains3x.git * scripttempl/elfxtensa.sc: Merge changes from elf.sc. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 8a40c00647..7e8d30423c 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,7 @@ +2007-05-03 Bob Wilson + + * scripttempl/elfxtensa.sc: Merge changes from elf.sc. + 2007-05-03 Alan Modra * ld.texinfo (--no-warn-search-mismatch): Document. diff --git a/ld/scripttempl/elfxtensa.sc b/ld/scripttempl/elfxtensa.sc index 8dcaa3c822..efeaa0260a 100644 --- a/ld/scripttempl/elfxtensa.sc +++ b/ld/scripttempl/elfxtensa.sc @@ -14,6 +14,7 @@ # (e.g., .PARISC.global) # OTHER_RELRO_SECTIONS - other than .data.rel.ro ... # (e.g. PPC32 .fixup, .got[12]) +# OTHER_BSS_SECTIONS - other than .bss .sbss ... # OTHER_SECTIONS - at the end # EXECUTABLE_SYMBOLS - symbols that must be defined for an # executable (e.g., _DYNAMIC_LINK) @@ -116,7 +117,9 @@ if test -n "${COMMONPAGESIZE}"; then DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);" DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);" fi -INTERP=".interp ${RELOCATING-0} : { *(.interp) }" +if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}"; then + INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }" +fi if test -z "$PLT"; then PLT=".plt ${RELOCATING-0} : { *(.plt) }" fi @@ -191,13 +194,15 @@ test "${LARGE_SECTIONS}" = "yes" && REL_LARGE=" .rela.lbss ${RELOCATING-0} : { *(.rela.lbss${RELOCATING+ .rela.lbss.* .rela.gnu.linkonce.lb.*}) } .rel.lrodata ${RELOCATING-0} : { *(.rel.lrodata${RELOCATING+ .rel.lrodata.* .rel.gnu.linkonce.lr.*}) } .rela.lrodata ${RELOCATING-0} : { *(.rela.lrodata${RELOCATING+ .rela.lrodata.* .rela.gnu.linkonce.lr.*}) }" -test "${LARGE_SECTIONS}" = "yes" && LARGE_SECTIONS=" +test "${LARGE_SECTIONS}" = "yes" && OTHER_BSS_SECTIONS=" + ${OTHER_BSS_SECTIONS} .lbss ${RELOCATING-0} : { *(.dynlbss) *(.lbss${RELOCATING+ .lbss.* .gnu.linkonce.lb.*}) *(LARGE_COMMON) - } + }" +test "${LARGE_SECTIONS}" = "yes" && LARGE_SECTIONS=" .lrodata ${RELOCATING-0} ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} : { *(.lrodata${RELOCATING+ .lrodata.* .gnu.linkonce.lr.*}) @@ -273,7 +278,6 @@ SECTIONS ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR}); . = ${TEXT_BASE_ADDRESS};}}} ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}} ${CREATE_PIE+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}} - ${CREATE_SHLIB-${INTERP}} ${INITIAL_READONLY_SECTIONS} ${TEXT_DYNAMIC+${DYNAMIC}} .hash ${RELOCATING-0} : { *(.hash) } @@ -471,6 +475,7 @@ cat <