bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Eliminating duplicate DWARF2 debug information doesn't work


From: Joachim Eibl
Subject: Eliminating duplicate DWARF2 debug information doesn't work
Date: Thu, 31 Jul 2003 12:50:16 +0200 (MEST)

Hi, 
 
>From "Changes in version 2.11:" 
 
> * Support added for eliminating duplicate DWARF2 debug information by 
>  having the compiler generate the information in sections called 
>  .gnu.linkonce.wi.XXXX where XXXX is a checksum for the contents.  The 
>  linker then merges these sections together into the normal .debug_info 
>  section. 
 
I use SuSE Linux 8.2: GNU ld version 2.13.90.0.18 20030121 and g++ (GCC) 3.3

20030226 (prerelease). 
 
I expected to get smaller shared libraries with debug information, but I
think it doesn't 
work. 
 
Test data: I compile several files via  
g++ -c -gdwarf-2 -o filename.o filename.cpp   
and link them via  
g++ -shared -Wl,-soname,test.so -o test.so $(OBJECTS) -Ur 
 
The result is too big, and I think that redundant debug information stays in
the result. 
 
Just to have a comparison I wrote a little wrapper module that includes all
cpp-files. 
e.g.: 
#include "file1.cpp" 
#include "file2.cpp" 
... 
When I compile and link this, with the same method, then the result is much
smaller. 
(To be precise: When compiling the files separately the resulting test.so
was 1,8 MByte, 
putting everything in one file let the result be only 0,8 MByte.) 
 
I also tried the "--traditional-format"-ld-flag, but without any effect. I
would expect a bigger 
result here, if eliminating duplicate debug symbols would be the default
behaviour. 
And using the "-feliminate-dwarf2-dups"-flag with g++ resulted in an even
bigger output of 
4,2 MByte. 
 
Note that this data was created for a little lib in a big project. Another
lib is much larger 
and results in a debug-size of 66 MByte, where I think it should not exceed
a third if 
eliminating duplicate debug symbols would work. 
 
Please inform me if I'm doing something wrong, or if this is a real bug. 
Regards, 
Joachim 

-- 
COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
--------------------------------------------------
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualitätssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post





reply via email to

[Prev in Thread] Current Thread [Next in Thread]