diff options
author | Richard Henderson <rth@redhat.com> | 2002-03-02 01:25:26 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 2002-03-02 01:25:26 +0000 |
commit | de77b6ac8be95777753a1642f53e5b6108bd014b (patch) | |
tree | dddd4216c0efae9baf9b24c451f77e8f19c1011a /ld/scripttempl | |
parent | 30831527a496163c41800021c20596dc252d4cc7 (diff) | |
download | gdb-de77b6ac8be95777753a1642f53e5b6108bd014b.zip gdb-de77b6ac8be95777753a1642f53e5b6108bd014b.tar.gz gdb-de77b6ac8be95777753a1642f53e5b6108bd014b.tar.bz2 |
* scripttempl/elf.sc (SECTIONS): Add entries for .preinit_array,
.init_array, and .fini_array.
Diffstat (limited to 'ld/scripttempl')
-rw-r--r-- | ld/scripttempl/elf.sc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc index be6fc09..bf67811 100644 --- a/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc @@ -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} : { |