From 600018ce474b1ecb7ea51f9fa0b005000ccc9101 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Sat, 6 May 2017 07:30:44 +0200 Subject: elf: Ignore SHF_COMPRESSED sections some newer systems have debug sections compressed by default, which includes those in the crt[1in].o startup files. These can't simply be concatenated like all others (which leads to invalid section contents ultimately making gdb fail) but need special handling. Instead of that special handling (decompressing, which in turn requires linking against zlib) let's just ignore such sections, even though that means to also ignore all other debug sections from that particular input file. Our own generated files of course don't have the problem. --- elf.h | 1 + 1 file changed, 1 insertion(+) (limited to 'elf.h') diff --git a/elf.h b/elf.h index d761747..68f3990 100644 --- a/elf.h +++ b/elf.h @@ -376,6 +376,7 @@ typedef struct required */ #define SHF_GROUP (1 << 9) /* Section is member of a group. */ #define SHF_TLS (1 << 10) /* Section hold thread-local data. */ +#define SHF_COMPRESSED (1 << 11) /* Section with compressed data. */ #define SHF_MASKOS 0x0ff00000 /* OS-specific. */ #define SHF_MASKPROC 0xf0000000 /* Processor-specific */ #define SHF_ORDERED (1 << 30) /* Special ordering requirement -- cgit v1.3.1