diff options
author | Alan Modra <amodra@gmail.com> | 2013-02-21 05:10:28 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2013-02-21 05:10:28 +0000 |
commit | 7c00cf684edb16b9513ccc71561a635c614574a7 (patch) | |
tree | 91f451f0227b756f7750e5684adc097031d390fb | |
parent | c03551323c0425db9b677ac2618e43854ac56064 (diff) | |
download | gdb-7c00cf684edb16b9513ccc71561a635c614574a7.zip gdb-7c00cf684edb16b9513ccc71561a635c614574a7.tar.gz gdb-7c00cf684edb16b9513ccc71561a635c614574a7.tar.bz2 |
* scripttempl/elf.sc (.init_array, .fini_array): Don't sort all
.init_array/.fini_array input sections before .ctors/.dtors input
sections.
(CTORS_IN_INIT_ARRAY, DTORS_IN_INIT_ARRAY): Adjust to suit.
-rw-r--r-- | ld/ChangeLog | 7 | ||||
-rw-r--r-- | ld/scripttempl/elf.sc | 10 |
2 files changed, 11 insertions, 6 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 95d466d..ff9f145 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,12 @@ 2013-02-21 Alan Modra <amodra@gmail.com> + * scripttempl/elf.sc (.init_array, .fini_array): Don't sort all + .init_array/.fini_array input sections before .ctors/.dtors input + sections. + (CTORS_IN_INIT_ARRAY, DTORS_IN_INIT_ARRAY): Adjust to suit. + +2013-02-21 Alan Modra <amodra@gmail.com> + * emultempl/elf32.em (write_build_id, setup_build_id): Adjust for elf_tdata changes. diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc index bbff233..9491995 100644 --- a/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc @@ -233,8 +233,8 @@ test "${LARGE_SECTIONS}" = "yes" && LARGE_SECTIONS=" if test "${ENABLE_INITFINI_ARRAY}" = "yes"; then SORT_INIT_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))" SORT_FINI_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))" - CTORS_IN_INIT_ARRAY="KEEP (*(EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors))" - DTORS_IN_FINI_ARRAY="KEEP (*(EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors))" + CTORS_IN_INIT_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors" + DTORS_IN_FINI_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors" else SORT_INIT_ARRAY="KEEP (*(SORT(.init_array.*)))" SORT_FINI_ARRAY="KEEP (*(SORT(.fini_array.*)))" @@ -245,16 +245,14 @@ INIT_ARRAY=".init_array ${RELOCATING-0} : { ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__init_array_start = .);}} ${SORT_INIT_ARRAY} - KEEP (*(.init_array)) - ${CTORS_IN_INIT_ARRAY} + KEEP (*(.init_array ${CTORS_IN_INIT_ARRAY})) ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__init_array_end = .);}} }" FINI_ARRAY=".fini_array ${RELOCATING-0} : { ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_start = .);}} ${SORT_FINI_ARRAY} - KEEP (*(.fini_array)) - ${DTORS_IN_FINI_ARRAY} + KEEP (*(.fini_array ${DTORS_IN_FINI_ARRAY})) ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_end = .);}} }" CTOR=".ctors ${CONSTRUCTING-0} : |