Bug 24725 - [dwz] Support compressed debug sections
Summary: [dwz] Support compressed debug sections
Status: NEW
Alias: None
Product: dwz
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
: P2 enhancement
Target Milestone: ---
Assignee: Nobody
Depends on:
Reported: 2019-06-24 09:16 UTC by Tom de Vries
Modified: 2024-02-03 13:41 UTC (History)
3 users (show)

See Also:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Tom de Vries 2019-06-24 09:16:26 UTC
Atm we error out when encountering a zlib-compressed debug section:
            if (dso->shdr[i].sh_flags & SHF_COMPRESSED)
                error (0, 0,
                       "%s: Found compressed %s section, not attempting dwz"
                       " compression",
                       dso->filename, name);
                return 1;

We could support this by zlib-decompressing before and zlib-recompressing after dwz-compression.
Comment 1 Tom de Vries 2019-07-04 11:34:23 UTC
$ gcc hello.c -g
$ objcopy --compress-debug-sections a.out
$ ./dwz a.out
./dwz: a.out: Found compressed .debug_aranges section, not attempting dwz compression
Comment 2 Mark Wielaard 2020-09-13 15:02:11 UTC
As a workaround you could use eu-elfcompress before/after the dwz run:

$ eu-elfcompress --type=none ./a.out 
$ dwz ./a.out 
$ eu-elfcompress --type=zlib ./a.out