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

--- Comment #10 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
Fixing this properly would require rewriting all of GCC's dwarf output code so
that each function in a separate section had its own debug data (and perhaps
using section groups to describe the relationships).  Then, when a function is
eliminated during linking, its debug data could be discarded as well.

That's a lot of work though, with very few users who would really benefit.

A quick-and-dirty hack would be to have an option to the linker to tell it to
point the dead debug info to a different address, somewhere that isn't mapped
into the program; though gdb might need to be taught what that address is as
well.

Reply via email to