mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-19 07:13:40 +08:00
8b6f4cd34f
We must keep all PREINIT_ARRAY, INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-sections. bfd/ PR ld/22677 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY, INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-sections. ld/ PR ld/22677 * scripttempl/elf.sc (PREINIT_ARRAY): New. Don't add .preinit_array for ld -r. * testsuite/ld-elf/pr22677.d: New file. * testsuite/ld-elf/pr22677.s: Likewise.
17 lines
240 B
ArmAsm
17 lines
240 B
ArmAsm
.section .preinit_array.01000,"aw",%preinit_array
|
|
.p2align 2
|
|
.word 0
|
|
|
|
.section .init_array.01000,"aw",%init_array
|
|
.p2align 2
|
|
.word 0
|
|
|
|
.section .fini_array.01000,"aw",%fini_array
|
|
.p2align 2
|
|
.word 0
|
|
|
|
.text
|
|
.globl foo
|
|
foo:
|
|
.word 0
|