* scripttempl/elf.sc (SECTIONS): Add entries for .preinit_array,
authorRichard Henderson <rth@redhat.com>
Sat, 2 Mar 2002 01:25:26 +0000 (01:25 +0000)
committerRichard Henderson <rth@redhat.com>
Sat, 2 Mar 2002 01:25:26 +0000 (01:25 +0000)
        .init_array, and .fini_array.

ld/ChangeLog
ld/scripttempl/elf.sc

index 84866b1a6929f75a4e27cfda8f1c59068592bb56..c0699c746eea2ddc9a6f4079ad68587b04767a03 100644 (file)
@@ -1,3 +1,8 @@
+2002-03-01  David Mosberger  <davidm@hpl.hp.com>
+
+       * scripttempl/elf.sc (SECTIONS): Add entries for .preinit_array,
+       .init_array, and .fini_array.
+
 2002-02-20  Andreas Schwab  <schwab@suse.de>
 
        * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Don't fold
@@ -60,7 +65,7 @@
 
 2002-02-15  Richard Henderson  <rth@redhat.com>
 
-        * emulparams/elf64alpha.sh (NOP): Adjust for big-endian
+       * emulparams/elf64alpha.sh (NOP): Adjust for big-endian
        definition.  Emit a unop+nop pair.
 
 2002-02-15  Hans-Peter Nilsson  <hp@bitrange.com>
index be6fc09b52c31451adae509d07b7e2fff35d8bcd..bf678117772e2d625583626a3c5a240cebcbce8b 100644 (file)
@@ -246,6 +246,23 @@ cat <<EOF
     ${RELOCATING+${INIT_END}}
   } =${NOP-0}
 
+  /* Ensure the __preinit_array_start label is properly aligned.  We
+     could instead move the label definition inside the section, but
+     the linker would then create the section even if it turns out to
+     be empty, which isn't pretty.  */
+  ${RELOCATING+. = ALIGN(${ALIGNMENT})}
+  ${RELOCATING+${CREATE_SHLIB-PROVIDE (__preinit_array_start = .);}}
+  .preinit_array   ${RELOCATING-0} : { *(.preinit_array) }
+  ${RELOCATING+${CREATE_SHLIB-PROVIDE (__preinit_array_end = .);}}
+
+  ${RELOCATING+${CREATE_SHLIB-PROVIDE (__init_array_start = .)}};
+  .init_array   ${RELOCATING-0} : { *(.init_array) }
+  ${RELOCATING+${CREATE_SHLIB-PROVIDE (__init_array_end = .);}}
+
+  ${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_start = .);}}
+  .fini_array   ${RELOCATING-0} : { *(.fini_array) }
+  ${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_end = .);}}
+
   ${DATA_PLT-${BSS_PLT-${PLT}}}
   .text         ${RELOCATING-0} :
   {
This page took 0.031386 seconds and 4 git commands to generate.