diff options
-rw-r--r-- | ld/ChangeLog | 5 | ||||
-rw-r--r-- | ld/scripttempl/elf.sc | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 2d4df31..218a304 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2004-09-24 Paul Brook <paul@codeosurcery.com> + + * scripttempl/elf.sc: Keep .preinit_array, .init_array and + .fini_array sections. + 2004-09-19 Andreas Schwab <schwab@suse.de> * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: Adjust data segment diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc index 1e85777..245ab03 100644 --- a/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc @@ -335,15 +335,15 @@ cat <<EOF be empty, which isn't pretty. */ ${RELOCATING+. = ALIGN(${ALIGNMENT});} ${RELOCATING+${CREATE_SHLIB-PROVIDE (__preinit_array_start = .);}} - .preinit_array ${RELOCATING-0} : { *(.preinit_array) } + .preinit_array ${RELOCATING-0} : { KEEP (*(.preinit_array)) } ${RELOCATING+${CREATE_SHLIB-PROVIDE (__preinit_array_end = .);}} ${RELOCATING+${CREATE_SHLIB-PROVIDE (__init_array_start = .);}} - .init_array ${RELOCATING-0} : { *(.init_array) } + .init_array ${RELOCATING-0} : { KEEP (*(.init_array)) } ${RELOCATING+${CREATE_SHLIB-PROVIDE (__init_array_end = .);}} ${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_start = .);}} - .fini_array ${RELOCATING-0} : { *(.fini_array) } + .fini_array ${RELOCATING-0} : { KEEP (*(.fini_array)) } ${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_end = .);}} ${RELOCATING+${CTOR}} |