From b7c871edcd83ccdc5fcd8148a7f433efd6b52255 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 17 May 2017 07:57:15 -0700 Subject: Mark debug sections referenced by kept debug sections 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. --- ld/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ld/ChangeLog') diff --git a/ld/ChangeLog b/ld/ChangeLog index 2034a1a..b71bc16 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,12 @@ +2017-05-17 H.J. Lu + + 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. + 2017-05-16 H.J. Lu PR ld/21481 -- cgit v1.1