mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 04:12:10 +08:00
d422d1c433
I noticed that _bfd_elf_gc_mark_extra_sections attempts to unmark related debug sections when it finds an unmarked code section. When it finds .text.foo is unmarked, for example, it removes .debug_line.text.foo as well (using the section name as a suffix match check. However, it bails out after finding one such section. bfd/ * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on first matching debug section. ld/testsuite/ * ld-gc/all-debug-sections.d: New file. * ld-gc/all-debug-sections.s: Likewise. * ld-gc/gc.exp: Execute new testcase.
11 lines
235 B
Makefile
11 lines
235 B
Makefile
#name: --gc-sections with multiple debug sections for a function section
|
|
#as: -gdwarf-sections
|
|
#ld: --gc-sections -e _start
|
|
#PROG: nm
|
|
|
|
#...
|
|
[0-9a-f]+ N +debug_aranges_main
|
|
[0-9a-f]+ N +debug_info_main
|
|
[0-9a-f]+ N +debug_line_main
|
|
#...
|