2011-12-05 Magnus Granberg Alphat-PC #391899 * ld/scripttempl/elf.sc Add support for crtbeginTS.o --- a/ld/scripttempl/elf.sc 2011-04-11 17:38:12.000000000 +0200 +++ b/ld/scripttempl/elf.sc 2011-12-05 22:05:49.500458140 +0100 @@ -225,8 +225,8 @@ 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="KEEP (*(EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtbeginTS.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors))" + DTORS_IN_FINI_ARRAY="KEEP (*(EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtbeginTS.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors))" else SORT_INIT_ARRAY="KEEP (*(SORT(.init_array.*)))" SORT_FINI_ARRAY="KEEP (*(SORT(.fini_array.*)))" @@ -264,6 +264,7 @@ KEEP (*crtbegin.o(.ctors)) KEEP (*crtbegin?.o(.ctors)) + KEEP (*crtbeginTS.o(.ctors)) /* We don't want to include the .ctor section from the crtend.o file until after the sorted ctors. @@ -280,6 +281,7 @@ ${CONSTRUCTING+${DTOR_START}} KEEP (*crtbegin.o(.dtors)) KEEP (*crtbegin?.o(.dtors)) + KEEP (*crtbeginTS.o(.ctors)) KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors))