Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"missing debug info" for executable with compressed debug sections #42

Closed
cout opened this issue Mar 21, 2017 · 3 comments
Closed

"missing debug info" for executable with compressed debug sections #42

cout opened this issue Mar 21, 2017 · 3 comments

Comments

@cout
Copy link

cout commented Mar 21, 2017

Nice work! Bloaty looks useful. I notice it complains about missing debug sections if the debug section is compressed, e.g.:

$ cat > test.cpp
int main() { }
$ g++ test.cpp -gdwarf -Wl,-fuse-ld=gold -Wl,--compress-debug-sections=zlib
$ ./bloaty ./a.out -d compileunits                                         
bloaty: missing debug info
$ ./bloaty ./a.out
     VM SIZE                       FILE SIZE
 --------------                 --------------
  20.8%     512 [ELF Headers]    2.75Ki  39.7%
   0.0%       0 .symtab             912  12.8%
   0.0%       0 .strtab             550   7.7%
  20.8%     512 .dynamic            512   7.2%
   0.0%       0 .shstrtab           413   5.8%
  16.6%     407 .text               407   5.7%
   9.6%     237 [Other]             271   3.8%
   9.9%     244 .eh_frame           244   3.4%
   6.9%     169 .dynstr             169   2.4%
   5.9%     144 .dynsym             144   2.0%
   0.0%       0 .zdebug_str         108   1.5%
   0.0%       0 .comment             79   1.1%
   0.0%       0 .zdebug_abbrev       73   1.0%
   0.0%       0 .zdebug_info         67   0.9%
   0.0%       0 .zdebug_line         64   0.9%
   2.1%      52 .eh_frame_hdr        52   0.7%
   2.0%      48 .plt                 48   0.7%
   2.0%      48 .rela.plt            48   0.7%
   1.8%      44 .hash                44   0.6%
   1.6%      40 .got.plt             40   0.6%
   0.0%       0 .zdebug_aranges      40   0.6%
 100.0%  2.40Ki TOTAL            6.93Ki 100.0%

It should either use the compressed debug section, or display a message that it cannot read compressed debug sections.

@haberman
Copy link
Member

Makes sense!

I can't reproduce this on my system (even when I pass these arguments, gold isn't compressing for some reason). Do you know if these sections have SHF_COMPRESSED set per these docs? Maybe try readelf -S --wide a.out and paste the output here?

@haberman
Copy link
Member

Here's a simple PR to just improve the error message: #55

@haberman
Copy link
Member

haberman commented Aug 9, 2021

True support for compressed debug sections was merged in #230 and #233.

@haberman haberman closed this as completed Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants