Just set the BFD_DECOMPRESS flag on the bfd, and let
binutils propagate it when it follows .gnu_debuglink.
Reviewed By: @jdelong
Differential Revision: D962978
There were two issues:
- you have to set BFD_DECOMPRESS on the bfd*, or it won't
decompress compressed sections,
- if the debug info is in a separate file, linked by
.gnu_debuglink, libbfd will follow the link, but won't
propagate the BFD_DECOMPRESS flag.
I changed the code to add the flag, and manually follow the
.gnu_debuglink sections, adding the flag as it goes.
Reviewed By: @jdelong
Differential Revision: D961365