diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2002-03-04 20:40:14 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2002-03-04 20:40:14 +0000 |
commit | b5090659de579b6a000367292b6a066dff022f5e (patch) | |
tree | a10311cbce7c9f3696fbb9c0fdbf59c8765c48dc /ld | |
parent | 937f164bdad49a45c2608a7f48ca93ee9b35b12b (diff) | |
download | gdb-b5090659de579b6a000367292b6a066dff022f5e.zip gdb-b5090659de579b6a000367292b6a066dff022f5e.tar.gz gdb-b5090659de579b6a000367292b6a066dff022f5e.tar.bz2 |
2002-03-04 H.J. Lu <hjl@gnu.org>
* scripttempl/elf.sc: Put .preinit_array, .init_array and
.fini_array in the data segment.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 5 | ||||
-rw-r--r-- | ld/scripttempl/elf.sc | 34 |
2 files changed, 22 insertions, 17 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 05c7fa2..28f9b7d 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2002-03-04 H.J. Lu <hjl@gnu.org> + + * scripttempl/elf.sc: Put .preinit_array, .init_array and + .fini_array in the data segment. + 2002-03-04 Alan Modra <amodra@bigpond.net.au> * scripttempl/elf.sc: Correct syntax errors in 2002-03-01 commit. diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc index 7fda8ba..a6bc4bc 100644 --- a/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc @@ -246,23 +246,6 @@ 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} : { @@ -293,6 +276,23 @@ cat <<EOF ${CREATE_SHLIB-${RELOCATING+. = ${DATA_ADDR-${DATA_SEGMENT_ALIGN}};}} ${CREATE_SHLIB+${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 + 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 ${RELOCATING-0} : { ${RELOCATING+${DATA_START_SYMBOLS}} |