diff options
-rw-r--r-- | bfd/elf.c | 7 | ||||
-rw-r--r-- | gas/write.c | 4 |
2 files changed, 6 insertions, 5 deletions
@@ -1199,12 +1199,11 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, } } - /* Compress/decompress DWARF debug sections with names: .debug_* and - .zdebug_*, after the section flags is set. */ + /* Compress/decompress DWARF debug sections with names: .debug_*, + .zdebug_*, .gnu.debuglto_.debug_, after the section flags is set. */ if ((newsect->flags & SEC_DEBUGGING) != 0 && (newsect->flags & SEC_HAS_CONTENTS) != 0 - && ((name[1] == 'd' && name[6] == '_') - || (name[1] == 'z' && name[7] == '_'))) + && (newsect->flags & SEC_ELF_OCTETS) != 0) { enum { nothing, compress, decompress } action = nothing; int compression_header_size; diff --git a/gas/write.c b/gas/write.c index 0e49df7..b8d5253 100644 --- a/gas/write.c +++ b/gas/write.c @@ -1481,7 +1481,9 @@ compress_debug (bfd *abfd, asection *sec, void *xxx ATTRIBUTE_UNUSED) return; section_name = bfd_section_name (sec); - if (!startswith (section_name, ".debug_")) + if (!startswith (section_name, ".debug_") + && (!startswith (section_name, ".gnu.debuglto_.debug_") + || flag_compress_debug == COMPRESS_DEBUG_GNU_ZLIB)) return; bool use_zstd = abfd->flags & BFD_COMPRESS_ZSTD; |