+2012-07-31 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/14156
+ * ldlang.c (wild_sort): Don't call compare_section in case of
+ by_none.
+
+ * scripttempl/elf.sc: Add SORT_NONE to .init and .fini sections.
+ * scripttempl/elf32msp430.sc: Likewise.
+ * scripttempl/elf32msp430_3.sc: Likewise.
+ * scripttempl/elfd10v.sc: Likewise.
+ * scripttempl/elfd30v.sc: Likewise.
+ * scripttempl/elfxtensa.sc: Likewise.
+
2012-07-30 Nick Clifton <nickc@redhat.com>
* po/ld.pot: Updated template.
/* Here either the files are not sorted by name, or we are
looking at the sections for this file. */
- if (sec != NULL && sec->spec.sorted != none)
+ if (sec != NULL
+ && sec->spec.sorted != none
+ && sec->spec.sorted != by_none)
if (compare_section (sec->spec.sorted, section, ls->section) < 0)
break;
}
.init ${RELOCATING-0} :
{
${RELOCATING+${INIT_START}}
- KEEP (*(.init))
+ KEEP (*(SORT_NONE(.init)))
${RELOCATING+${INIT_END}}
} ${FILL}
.fini ${RELOCATING-0} :
{
${RELOCATING+${FINI_START}}
- KEEP (*(.fini))
+ KEEP (*(SORT_NONE(.fini)))
${RELOCATING+${FINI_END}}
} ${FILL}
${RELOCATING+PROVIDE (__${ETEXT_NAME} = .);}
.text :
{
${RELOCATING+. = ALIGN(2);}
- *(.init)
- *(.init0) /* Start here after reset. */
- *(.init1)
- *(.init2) /* Copy data loop */
- *(.init3)
- *(.init4) /* Clear bss */
- *(.init5)
- *(.init6) /* C++ constructors. */
- *(.init7)
- *(.init8)
- *(.init9) /* Call main(). */
+ *(SORT_NONE(.init))
+ *(SORT_NONE(.init0)) /* Start here after reset. */
+ *(SORT_NONE(.init1))
+ *(SORT_NONE(.init2)) /* Copy data loop */
+ *(SORT_NONE(.init3))
+ *(SORT_NONE(.init4)) /* Clear bss */
+ *(SORT_NONE(.init5))
+ *(SORT_NONE(.init6)) /* C++ constructors. */
+ *(SORT_NONE(.init7))
+ *(SORT_NONE(.init8))
+ *(SORT_NONE(.init9)) /* Call main(). */
${CONSTRUCTING+ __ctors_start = . ; }
${CONSTRUCTING+ *(.ctors) }
*(.text.*)
${RELOCATING+. = ALIGN(2);}
- *(.fini9) /* */
- *(.fini8)
- *(.fini7)
- *(.fini6) /* C++ destructors. */
- *(.fini5)
- *(.fini4)
- *(.fini3)
- *(.fini2)
- *(.fini1)
- *(.fini0) /* Infinite loop after program termination. */
- *(.fini)
+ *(SORT_NONE(.fini9))
+ *(SORT_NONE(.fini8))
+ *(SORT_NONE(.fini7))
+ *(SORT_NONE(.fini6)) /* C++ destructors. */
+ *(SORT_NONE(.fini5))
+ *(SORT_NONE(.fini4))
+ *(SORT_NONE(.fini3))
+ *(SORT_NONE(.fini2))
+ *(SORT_NONE(.fini1))
+ *(SORT_NONE(.fini0)) /* Infinite loop after program termination. */
+ *(SORT_NONE(.fini))
_etext = .;
} ${RELOCATING+ > text}
.text :
{
${RELOCATING+. = ALIGN(2);}
- *(.init)
- *(.init0) /* Start here after reset. */
- *(.init1)
- *(.init2)
- *(.init3)
- *(.init4)
- *(.init5)
- *(.init6) /* C++ constructors. */
- *(.init7)
- *(.init8)
- *(.init9) /* Call main(). */
+ *(SORT_NONE(.init))
+ *(SORT_NONE(.init0)) /* Start here after reset. */
+ *(SORT_NONE(.init1))
+ *(SORT_NONE(.init2))
+ *(SORT_NONE(.init3))
+ *(SORT_NONE(.init4))
+ *(SORT_NONE(.init5))
+ *(SORT_NONE(.init6)) /* C++ constructors. */
+ *(SORT_NONE(.init7))
+ *(SORT_NONE(.init8))
+ *(SORT_NONE(.init9)) /* Call main(). */
${CONSTRUCTING+ __ctors_start = . ; }
${CONSTRUCTING+ *(.ctors) }
*(.text.*)
${RELOCATING+. = ALIGN(2);}
- *(.fini9)
- *(.fini8)
- *(.fini7)
- *(.fini6) /* C++ destructors. */
- *(.fini5)
- *(.fini4)
- *(.fini3)
- *(.fini2)
- *(.fini1)
- *(.fini0) /* Infinite loop after program termination. */
- *(.fini)
+ *(SORT_NONE(.fini9))
+ *(SORT_NONE(.fini8))
+ *(SORT_NONE(.fini7))
+ *(SORT_NONE(.fini6)) /* C++ destructors. */
+ *(SORT_NONE(.fini5))
+ *(SORT_NONE(.fini4))
+ *(SORT_NONE(.fini3))
+ *(SORT_NONE(.fini2))
+ *(SORT_NONE(.fini1))
+ *(SORT_NONE(.fini0)) /* Infinite loop after program termination. */
+ *(SORT_NONE(.fini))
${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > text}
.text ${RELOCATING+${TEXT_START_ADDR}} :
{
${RELOCATING+${TEXT_START_SYMBOLS}}
- KEEP (*(.init))
- KEEP (*(.init.*))
- KEEP (*(.fini))
- KEEP (*(.fini.*))
+ KEEP (*(SORT_NONE(.init)))
+ KEEP (*(SORT_NONE(.init.*)))
+ KEEP (*(SORT_NONE(.fini)))
+ KEEP (*(SORT_NONE(.fini.*)))
*(.text)
*(.text.*)
/* .gnu.warning sections are handled specially by elf32.em. */
{
*(.text)
*(.gnu.linkonce.t*)
- *(.init)
- *(.fini)
+ *(SORT_NONE(.init))
+ *(SORT_NONE(.fini))
${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ${TEXT_MEMORY}}
${RELOCATING+${INIT_START}}
${RELOCATING+KEEP (*(.init.literal))}
- ${RELOCATING+KEEP (*(.init))}
+ ${RELOCATING+KEEP (*(SORT_NONE(.init)))}
${RELOCATING+${INIT_END}}
${RELOCATING+${TEXT_START_SYMBOLS}}
${RELOCATING+${FINI_START}}
${RELOCATING+KEEP (*(.fini.literal))}
- ${RELOCATING+KEEP (*(.fini))}
+ ${RELOCATING+KEEP (*(SORT_NONE(.fini)))}
${RELOCATING+${FINI_END}}
} =${NOP-0}