From b00954647c023e1b53bd72275061a71d0b67c437 Mon Sep 17 00:00:00 2001 From: hjl Date: Thu, 14 Oct 2004 17:00:15 +0000 Subject: [PATCH] 2004-10-14 H.J. Lu PR 445 * emulparams/elf64_ia64.sh (SMALL_DATA_CTOR): Set. (SMALL_DATA_DTOR): Set. * emulparams/elf64_ia64_fbsd.sh (SMALL_DATA_CTOR): Unset. (SMALL_DATA_DTOR): Unset. * scripttempl/elf.sc: If SMALL_DATA_CTOR is set, move .ctors after .data. If SMALL_DATA_DTOR is set, move .dtors after .data. --- ld/ChangeLog | 11 +++++++++++ ld/emulparams/elf64_ia64.sh | 4 ++++ ld/emulparams/elf64_ia64_fbsd.sh | 2 ++ ld/scripttempl/elf.sc | 8 ++++++-- 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index fc61f7f8ed..2cfcdd80a8 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,14 @@ +2004-10-14 H.J. Lu + + PR 445 + * emulparams/elf64_ia64.sh (SMALL_DATA_CTOR): Set. + (SMALL_DATA_DTOR): Set. + * emulparams/elf64_ia64_fbsd.sh (SMALL_DATA_CTOR): Unset. + (SMALL_DATA_DTOR): Unset. + * scripttempl/elf.sc: If SMALL_DATA_CTOR is set, move .ctors + after .data. If SMALL_DATA_DTOR is set, move .dtors after + .data. + 2004-10-14 Alan Modra PR 63 diff --git a/ld/emulparams/elf64_ia64.sh b/ld/emulparams/elf64_ia64.sh index 60c8c4c9eb..c5be56e850 100644 --- a/ld/emulparams/elf64_ia64.sh +++ b/ld/emulparams/elf64_ia64.sh @@ -33,3 +33,7 @@ test -n "$CREATE_PIE" && OTHER_GOT_RELOC_SECTIONS=" 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.*}) }" +# Intel C++ compiler, prior to 9.0, puts small data in .ctors and +# .dtors. They have to be next to .sbss/.sbss2/.sdata/.sdata2. +SMALL_DATA_CTOR=" " +SMALL_DATA_DTOR=" " diff --git a/ld/emulparams/elf64_ia64_fbsd.sh b/ld/emulparams/elf64_ia64_fbsd.sh index 47cde5c5db..ab7e78f292 100644 --- a/ld/emulparams/elf64_ia64_fbsd.sh +++ b/ld/emulparams/elf64_ia64_fbsd.sh @@ -1,4 +1,6 @@ . ${srcdir}/emulparams/elf64_ia64.sh TEXT_START_ADDR="0x2000000000000000" unset DATA_ADDR +unset SMALL_DATA_CTOR +unset SMALL_DATA_DTOR . ${srcdir}/emulparams/elf_fbsd.sh diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc index d560f58fe6..c7311b1f32 100644 --- a/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc @@ -3,6 +3,8 @@ # NOP - four byte opcode for no-op (defaults to 0) # NO_SMALL_DATA - no .sbss/.sbss2/.sdata/.sdata2 sections if not # empty. +# SMALL_DATA_CTOR - .ctors contains small data. +# SMALL_DATA_DTOR - .dtors contains small data. # DATA_ADDR - if end-of-text-plus-one-page isn't right for data start # INITIAL_READONLY_SECTIONS - at start of text segment # OTHER_READONLY_SECTIONS - other than .text .init .rodata ... @@ -347,8 +349,8 @@ cat <