aboutsummaryrefslogtreecommitdiff
path: root/ld/scripttempl/elf.sc
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2004-10-14 17:00:16 +0000
committerH.J. Lu <hjl.tools@gmail.com>2004-10-14 17:00:16 +0000
commit951e9133c443e48655d85973b5d2e8adbbeb1c0d (patch)
tree38a00e6e1b856c8a55a2bd32f508ea3cc0d2e892 /ld/scripttempl/elf.sc
parente0255be8fccea5f3911f5f1b1942cb04c723ba12 (diff)
downloadgdb-951e9133c443e48655d85973b5d2e8adbbeb1c0d.zip
gdb-951e9133c443e48655d85973b5d2e8adbbeb1c0d.tar.gz
gdb-951e9133c443e48655d85973b5d2e8adbbeb1c0d.tar.bz2
2004-10-14 H.J. Lu <hongjiu.lu@intel.com>
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.
Diffstat (limited to 'ld/scripttempl/elf.sc')
-rw-r--r--ld/scripttempl/elf.sc8
1 files changed, 6 insertions, 2 deletions
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
index d560f58..c7311b1 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 <<EOF
.fini_array ${RELOCATING-0} : { KEEP (*(.fini_array)) }
${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_end = .);}}
- ${RELOCATING+${CTOR}}
- ${RELOCATING+${DTOR}}
+ ${SMALL_DATA_CTOR-${RELOCATING+${CTOR}}}
+ ${SMALL_DATA_DTOR-${RELOCATING+${DTOR}}}
.jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
${RELOCATING+${DATARELRO}}
@@ -372,6 +374,8 @@ cat <<EOF
.data1 ${RELOCATING-0} : { *(.data1) }
${WRITABLE_RODATA+${RODATA}}
${OTHER_READWRITE_SECTIONS}
+ ${SMALL_DATA_CTOR+${RELOCATING+${CTOR}}}
+ ${SMALL_DATA_DTOR+${RELOCATING+${DTOR}}}
${DATA_PLT+${PLT_BEFORE_GOT+${PLT}}}
${RELOCATING+${OTHER_GOT_SYMBOLS}}
${NO_SMALL_DATA-${GOT}}