summaryrefslogtreecommitdiff
path: root/ld/scripttempl/armbpabi.sc
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2005-11-03 15:01:58 +0000
committerPaul Brook <paul@codesourcery.com>2005-11-03 15:01:58 +0000
commit953326ad789e331860026a315f5e53135e43fc64 (patch)
tree7158b43ef12ca843055d75822d4644760d06eff6 /ld/scripttempl/armbpabi.sc
parent641e5b9a35343a73b417eb5dc4a24c73d7953883 (diff)
downloadbinutils-redhat-953326ad789e331860026a315f5e53135e43fc64.tar.gz
2005-11-03 Paul Brook <paul@codesourcery.com>
* scripttempl/elf.sc: Add .init_array.* and .fini_array.*. * scripttempl/armbpabi.sc: Make init/fini array consistent with elf.sc. * scripttempl/elf32sh-symbian.sc: Ditto. * scripttempl/elfxtensa.sc: Ditto.
Diffstat (limited to 'ld/scripttempl/armbpabi.sc')
-rw-r--r--ld/scripttempl/armbpabi.sc44
1 files changed, 24 insertions, 20 deletions
diff --git a/ld/scripttempl/armbpabi.sc b/ld/scripttempl/armbpabi.sc
index dccc8cdf15..2785812659 100644
--- a/ld/scripttempl/armbpabi.sc
+++ b/ld/scripttempl/armbpabi.sc
@@ -211,26 +211,30 @@ cat <<EOF
segment; there is no runtime relocation applied to these
arrays. */
- /* Ensure the __preinit_array_start label is properly aligned. We
- could instead move the label definition inside the section, but
- the linker would then create the section even if it turns out to
- be empty, which isn't pretty. */
- ${RELOCATING+. = ALIGN(${ALIGNMENT});}
- ${RELOCATING+${CREATE_SHLIB-PROVIDE (__preinit_array_start = .);}}
- .preinit_array ${RELOCATING-0} : { *(.preinit_array) }
- ${RELOCATING+${CREATE_SHLIB-PROVIDE (__preinit_array_end = .);}}
-
- ${RELOCATING+${CREATE_SHLIB-PROVIDE (__init_array_start = .);}}
- /* SymbianOS uses this symbol. */
- ${RELOCATING+PROVIDE (SHT\$\$INIT_ARRAY\$\$Base = .);}
- .init_array ${RELOCATING-0} : { *(.init_array) }
- /* SymbianOS uses this symbol. */
- ${RELOCATING+PROVIDE (SHT\$\$INIT_ARRAY\$\$Limit = .);}
- ${RELOCATING+${CREATE_SHLIB-PROVIDE (__init_array_end = .);}}
-
- ${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_start = .);}}
- .fini_array ${RELOCATING-0} : { *(.fini_array) }
- ${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_end = .);}}
+ .preinit_array ${RELOCATING-0} :
+ {
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__preinit_array_start = .);}}
+ KEEP (*(.preinit_array))
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__preinit_array_end = .);}}
+ }
+ .init_array ${RELOCATING-0} :
+ {
+ /* SymbianOS uses this symbol. */
+ ${RELOCATING+PROVIDE (SHT\$\$INIT_ARRAY\$\$Base = .);}
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__init_array_start = .);}}
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array))
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__init_array_end = .);}}
+ /* SymbianOS uses this symbol. */
+ ${RELOCATING+PROVIDE (SHT\$\$INIT_ARRAY\$\$Limit = .);}
+ }
+ .fini_array ${RELOCATING-0} :
+ {
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__fini_array_start = .);}}
+ KEEP (*(.fini_array))
+ KEEP (*(SORT(.fini_array.*)))
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__fini_array_end = .);}}
+ }
${OTHER_READONLY_SECTIONS}
.eh_frame_hdr : { *(.eh_frame_hdr) }