[LLVMdev] .debug_info section size in arm executable
Nick Lewycky
nicholas at mxc.ca
Wed Nov 9 02:58:36 PST 2011
Seung-yeon Choe wrote:
> Dear all
>
> I'd wonder why executable's debug information size is bigger than gcc dwarf debug info.
>
> When I compiled ARM hello world code with -g option, the arm based assembly and executable files are bigger than gcc results significiantly.(apx. 3x)
> (source file size was only 3KB)
>
> I think that both clang and gcc use same dwarf format ver2 for debugging. But I don't know why the clang executable file size is bigger than gcc executable.
>
> Could anyone explain about that?
For one example, for enums clang will emit the names for all of the enum
cases. GCC only emits the ones that are used.
If you're on linux, I suggest running "readelf -w file.o" to examine
what is actually in the debug info in your files. Figuring out how to
shrink our debug info size is something we're actively working on.
A couple bugs I'm looking at right now are llvm.org/PR11323 and
llvm.org/PR11345 .
Nick
More information about the llvm-dev
mailing list