[LLVMbugs] [Bug 15889] New: Debug info much larger with clang than with gcc

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed May 1 08:17:53 PDT 2013


            Bug ID: 15889
           Summary: Debug info much larger with clang than with gcc
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mh+llvm at glandium.org
                CC: echristo at gmail.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 10451
  --> http://llvm.org/bugs/attachment.cgi?id=10451&action=edit
Preprocessed source (compressed)

I've built a relatively recent mozilla-central based Firefox, and the libxul.so
file is greater than 3GB when built with clang (3.2 from debian experimental),
while the same code built with gcc 4.7.2 (from debian unstable) generates a
file slightly smaller than 1GB.

Interestingly, the size of all debug info sections (but not relocations) in
object files in the gcc-built tree adds up to about 1.8GB, vs. 2.8GB in the
clang-built tree (and yes, the linked file has a bigger debug info data than
the sum of all objects, including those that are not in that linked file (I
didn't discriminate)). Remarkably, some objects have smaller debug info in the

I'm attaching here the (preprocessed) source file that causes the biggest
difference between objects built from gcc and clang. Fortunately, it's also
reasonably small (fwvo reasonable). Please tell me if you need more (like the
object files), but I've been able to reproduce with clang -O2 -g vs. gcc -O2 -g
(that is, outside the mozilla build system, with just these flags). gcc's debug
info is about 2k overall, while it is 10k for clang.

I don't know if it makes sense to attach more such files (I have a complete
list of the size differences, there are ~2000 files, over the ~6000 total that
are bigger with clang, ~1500 of which are 50% bigger or more)

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130501/833ad190/attachment.html>

More information about the llvm-bugs mailing list