From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27556 invoked by alias); 28 Aug 2012 23:26:17 -0000 Received: (qmail 27534 invoked by uid 22791); 28 Aug 2012 23:26:16 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Aug 2012 23:26:03 +0000 From: "bugdal at aerifal dot cx" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/54395] New: DWARF tables should go in non-mapped section unless exceptions are enabled Date: Tue, 28 Aug 2012 23:26:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bugdal at aerifal dot cx X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-08/txt/msg01879.txt.bz2 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: unassigned@gcc.gnu.org ReportedBy: bugdal@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.