summaryrefslogtreecommitdiff
path: root/ld/scripttempl
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-08-01 01:03:46 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-08-01 01:03:46 +0000
commite65eb8b1c6dad97ae8315390356084dac7633e3f (patch)
treee40c06b14319c34cd0e1d6df6feb808be522ef3f /ld/scripttempl
parent0cceaa9eb78800bb84e57ff515a9f3d0fc1c6d7f (diff)
downloadbinutils-redhat-e65eb8b1c6dad97ae8315390356084dac7633e3f.tar.gz
Don't call compare_section in case of by_none
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.
Diffstat (limited to 'ld/scripttempl')
-rw-r--r--ld/scripttempl/elf.sc4
-rw-r--r--ld/scripttempl/elf32msp430.sc44
-rw-r--r--ld/scripttempl/elf32msp430_3.sc44
-rw-r--r--ld/scripttempl/elfd10v.sc8
-rw-r--r--ld/scripttempl/elfd30v.sc4
-rw-r--r--ld/scripttempl/elfxtensa.sc4
6 files changed, 54 insertions, 54 deletions
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
index 17c2cf105c..51a655eed6 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
@@ -462,7 +462,7 @@ cat <<EOF
.init ${RELOCATING-0} :
{
${RELOCATING+${INIT_START}}
- KEEP (*(.init))
+ KEEP (*(SORT_NONE(.init)))
${RELOCATING+${INIT_END}}
} ${FILL}
@@ -483,7 +483,7 @@ cat <<EOF
.fini ${RELOCATING-0} :
{
${RELOCATING+${FINI_START}}
- KEEP (*(.fini))
+ KEEP (*(SORT_NONE(.fini)))
${RELOCATING+${FINI_END}}
} ${FILL}
${RELOCATING+PROVIDE (__${ETEXT_NAME} = .);}
diff --git a/ld/scripttempl/elf32msp430.sc b/ld/scripttempl/elf32msp430.sc
index 5098c174ad..beabd89a2b 100644
--- a/ld/scripttempl/elf32msp430.sc
+++ b/ld/scripttempl/elf32msp430.sc
@@ -99,17 +99,17 @@ SECTIONS
.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) }
@@ -124,17 +124,17 @@ SECTIONS
*(.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}
diff --git a/ld/scripttempl/elf32msp430_3.sc b/ld/scripttempl/elf32msp430_3.sc
index c730c5d826..0ddcf0f491 100644
--- a/ld/scripttempl/elf32msp430_3.sc
+++ b/ld/scripttempl/elf32msp430_3.sc
@@ -75,17 +75,17 @@ SECTIONS
.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) }
@@ -100,17 +100,17 @@ SECTIONS
*(.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}
diff --git a/ld/scripttempl/elfd10v.sc b/ld/scripttempl/elfd10v.sc
index 1cdfbdc422..dc45cdd350 100644
--- a/ld/scripttempl/elfd10v.sc
+++ b/ld/scripttempl/elfd10v.sc
@@ -87,10 +87,10 @@ SECTIONS
.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. */
diff --git a/ld/scripttempl/elfd30v.sc b/ld/scripttempl/elfd30v.sc
index d8d3fbede2..df64f1b1f7 100644
--- a/ld/scripttempl/elfd30v.sc
+++ b/ld/scripttempl/elfd30v.sc
@@ -110,8 +110,8 @@ SECTIONS
{
*(.text)
*(.gnu.linkonce.t*)
- *(.init)
- *(.fini)
+ *(SORT_NONE(.init))
+ *(SORT_NONE(.fini))
${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ${TEXT_MEMORY}}
diff --git a/ld/scripttempl/elfxtensa.sc b/ld/scripttempl/elfxtensa.sc
index d3302302bf..5e037972b5 100644
--- a/ld/scripttempl/elfxtensa.sc
+++ b/ld/scripttempl/elfxtensa.sc
@@ -402,7 +402,7 @@ cat <<EOF
${RELOCATING+${INIT_START}}
${RELOCATING+KEEP (*(.init.literal))}
- ${RELOCATING+KEEP (*(.init))}
+ ${RELOCATING+KEEP (*(SORT_NONE(.init)))}
${RELOCATING+${INIT_END}}
${RELOCATING+${TEXT_START_SYMBOLS}}
@@ -413,7 +413,7 @@ cat <<EOF
${RELOCATING+${FINI_START}}
${RELOCATING+KEEP (*(.fini.literal))}
- ${RELOCATING+KEEP (*(.fini))}
+ ${RELOCATING+KEEP (*(SORT_NONE(.fini)))}
${RELOCATING+${FINI_END}}
} =${NOP-0}