http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54395

             Bug #: 54395
           Summary: DWARF tables should go in non-mapped section unless
                    exceptions are enabled
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: bug...@aerifal.cx


On systems where GCC uses DWARF for debugging information, the DWARF tables are
stored in the .eh_frame section, which the linker maps into the LOAD segment
for the program, and which is not safely strippable with the strip command
(because it messes up section numbering). This is of course necessary if
exceptions are enabled (for languages that require them, or for -fexceptions in
"GNU C" code), but it's harmful when they're not wanted. It would be nice if
GCC had a way to store a "purely for debugging" version of the tables in a
separate section that could safely be stripped, that would not get loaded in a
LOAD segment, and that would not artificially inflate the size(1) of the object
files (which is frustrating when trying to measure relative improvements in
optimizing the size of object files).

At present, -fno-asynchronous-unwind-tables -fno-unwind-tables can eliminate
the problem, but it also conflicts with debugging; it seems impossible to
generate object files that are debugging-enabled but that don't push (part of)
the debugging data into the mapped-at-runtime part of the program.

Reply via email to