aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-gc/pr20882a.s
AgeCommit message (Collapse)AuthorFilesLines
2017-05-18pr20882 testcaseAlan Modra1-5/+2
-gdwarf-sections doesn't work on targets that lack support to emit address size relative relocs. The testcase as it was avoided -gdwarf-sections doing anything by providing a non-empty .debug_line. It's better to not use -gdwarf-sections. Also, the testcase failed to match the output for 16-bit address targets like avr. PR ld/20882 * testsuite/ld-gc/pr20882.d: Don't pass -gdwarf-sections to gas. Allow for 16-bit address targets and match expected data fully. * testsuite/ld-gc/pr20882a.s: Delete .debug_line section. * testsuite/ld-gc/pr20882b.s: Likewise. * testsuite/ld-gc/pr20882c.s: Likewise.
2017-05-17Mark debug sections referenced by kept debug sectionsH.J. Lu1-0/+11
If a debug section is referenced by a kept debug section, it should also be kept. Some targets, like mips, keep input files when there are some special sections, like .gnu.attributes, even if input file is unused otherwise. In this case, all debug sections are kept. The new test will fail on such targets. We can either fix those targets or XFAIL the test. bfd/ PR ld/20882 * elflink.c (elf_gc_mark_debug_section): New function. (_bfd_elf_gc_mark_extra_sections): Mark any debug sections referenced by kept debug sections. ld/ PR ld/20882 * testsuite/ld-gc/gc.exp: Run pr20882. * testsuite/ld-gc/pr20882.d: New file. * testsuite/ld-gc/pr20882a.s: Likewise. * testsuite/ld-gc/pr20882b.s: Likewise. * testsuite/ld-gc/pr20882c.s: Likewise.