diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 8 | ||||
-rw-r--r-- | ld/emulparams/elf64_ia64.sh | 9 | ||||
-rw-r--r-- | ld/scripttempl/elf.sc | 7 |
3 files changed, 19 insertions, 5 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index b8b160e..e0ccf8b 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,11 @@ +2003-07-02 Jakub Jelinek <jakub@redhat.com> + + * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Don't include + .opd if -pie. + (OTHER_READWRITE_SECTIONS): Include .opd if -pie. + * scripttempl/elf.sc: Use SHLIB_DATA_ADDR instead of DATA_ADDR + if -pie. + 2003-06-28 Alan Modra <amodra@bigpond.net.au> * ld.h: Convert to C90, remove unnecessary prototypes and casts. diff --git a/ld/emulparams/elf64_ia64.sh b/ld/emulparams/elf64_ia64.sh index 85ffe61..d9c7f6a 100644 --- a/ld/emulparams/elf64_ia64.sh +++ b/ld/emulparams/elf64_ia64.sh @@ -22,7 +22,12 @@ OTHER_GOT_SECTIONS=" .IA_64.pltoff ${RELOCATING-0} : { *(.IA_64.pltoff) }" OTHER_PLT_RELOC_SECTIONS=" .rela.IA_64.pltoff ${RELOCATING-0} : { *(.rela.IA_64.pltoff) }" -OTHER_READONLY_SECTIONS=" - .opd ${RELOCATING-0} : { *(.opd) } +OTHER_READONLY_SECTIONS= +OTHER_READWRITE_SECTIONS= +test -z "$CREATE_PIE" && OTHER_READONLY_SECTIONS=" + .opd ${RELOCATING-0} : { *(.opd) }" +test -n "$CREATE_PIE" && OTHER_READWRITE_SECTIONS=" + .opd ${RELOCATING-0} : { *(.opd) }" +OTHER_READONLY_SECTIONS="${OTHER_READONLY_SECTIONS} .IA_64.unwind_info ${RELOCATING-0} : { *(.IA_64.unwind_info${RELOCATING+* .gnu.linkonce.ia64unwi.*}) } .IA_64.unwind ${RELOCATING-0} : { *(.IA_64.unwind${RELOCATING+* .gnu.linkonce.ia64unw.*}) }" diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc index 97b100e..0c1f5c6 100644 --- a/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc @@ -72,8 +72,8 @@ if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHI test -z "${ELFSIZE}" && ELFSIZE=32 test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8" test "$LD_FLAG" = "N" && DATA_ADDR=. -test -n "$CREATE_SHLIB" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE="" -test -z "$CREATE_SHLIB" && test -n "$DATA_ADDR" && COMMONPAGESIZE="" +test -n "$CREATE_SHLIB$CREATE_PIE" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE="" +test -z "$CREATE_SHLIB$CREATE_PIE" && test -n "$DATA_ADDR" && COMMONPAGESIZE="" DATA_SEGMENT_ALIGN="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))" DATA_SEGMENT_END="" if test -n "${COMMONPAGESIZE}"; then @@ -285,8 +285,9 @@ cat <<EOF /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ - ${CREATE_SHLIB-${RELOCATING+. = ${DATA_ADDR-${DATA_SEGMENT_ALIGN}};}} + ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+. = ${DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}} ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}} + ${CREATE_PIE+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}} /* Ensure the __preinit_array_start label is properly aligned. We could instead move the label definition inside the section, but |