https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98765

            Bug ID: 98765
           Summary: [11 Regression] stripping of LTO debug sections
                    doesn't work anymore since switch to -gdwarf-5 by
                    default
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

Testcase a.i:

# 0 "a.c"
# 1 "/var/tmp//"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "a.c"
# 1 "a.h" 1
int
foo (void)
{
  return 0;
}
# 2 "a.c" 2

int
bar (void)
{
  return 0;
}

With gcc configured against latest binutils:
gcc -S -g -flto -ffat-lto-objects a.i
gcc -c a.s -o a.o
strip -p -R .gnu.lto_* -R .gnu.debuglto_* -N __gnu_lto_v1 a.o
strip: st3FEz69: symbol `.gnu.debuglto_.debug_line_str' required but not
present
strip: st3FEz69: no symbols

Reply via email to