mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
6f9dbcd42f
PR21287 notes that .init_array is correctly given a type of
SHT_INIT_ARRAY while .init_array.nnn gets SHT_PROGBITS. This patch
fixes that problem, and properly drops warnings from the compiler that
would cause the testsuite to fail. My a44d0bd78
change to check
ld_compile status, necessary to pick up compile errors, also meant
warnings were not ignored.
bfd/
PR 21287
* elf.c (special_sections_f): Match .fini_array and .fini_array.*.
(special_sections_i): Likewise for .init_array.
(special_sections_p): Likewise for .preinit_array.
ld/
PR 21287
* testsuite/ld-elf/init-fini-arrays.d: Match INIT_ARRAY and FINI_ARRAY.
* testsuite/ld-elf/init-fini-arrays.s: Use %init_array and %fini_array
section types.
* testsuite/lib/ld-lib.exp (default_ld_compile): Trim assembler
warnings about "ignoring incorrect section type".
(run_ld_link_exec_tests, run_cc_link_tests): Delete old comment.
14 lines
441 B
Makefile
14 lines
441 B
Makefile
#source: init-fini-arrays.s
|
|
#ld: -r
|
|
#readelf: -S --wide
|
|
#xfail: cr16-*-* crx-*-* msp430-*-*
|
|
# msp430 puts the init_array and fini_array inside the .rodata section.
|
|
# cr16 and crx use non-standard scripts with memory regions, which don't play
|
|
# well with unique group sections under ld -r.
|
|
|
|
#...
|
|
\[[ 0-9]+\] \.init_array\.01000[ \t]+INIT_ARRAY[ \t0-9a-f]+WA?.*
|
|
#...
|
|
\[[ 0-9]+\] \.fini_array\.01000[ \t]+FINI_ARRAY[ \t0-9a-f]+WA?.*
|
|
#pass
|