On 9/25/23 00:11, Kyle Huey via Dwarf-discuss wrote:
Most likely the .debug_info section is SHF_COMPRESSED. Try compiling with -gz=none.
Also note that there are different approaches that have been used. If the section content starts with "ZLIB" a struct is present and the content is zlib/libz compressed. (I find the naming hard to keep straight, libz/zlib meaning the same thing, link it in with -lz). The Elf section name may start with .z, as for example .zdebug_info for the .debug_info section meaning .debug_info is libz compressed. Using section (Elf) flag SHF_COMPRESSED a struct begins the section with a type and size libz case ELFCOMPRESS_ZLIB libzstd case ELFCOMPRESS_ZSTD (link it in with -lzstd) Hopefully you will not need to handle more than one case. David Anderson -- Dwarf-discuss mailing list Dwarf-discuss@lists.dwarfstd.org https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss