diff options
| author | Wen Yang <[email protected]> | 2022-03-31 15:18:39 +0800 |
|---|---|---|
| committer | Wen Yang <[email protected]> | 2022-03-31 15:18:39 +0800 |
| commit | cefc7b02b5185ab9ce9d3546a35ee73cd0f609c6 (patch) | |
| tree | 3a29fcccdcf297ab6e351a8974eb7b3d9697875c /deps | |
| parent | 5cdd4b3119e626afa348429dc891afedabd9f899 (diff) | |
Make SHF_COMPRESSED use contingent on its existence
(cherry picked from commit d9b061db93d777650d7d16b5ce687639a84a22c0)
A recent change broke builds for many non-recent and non-Linux targets
by adding code dependent on a non-portable preprocessor macro
SHF_COMPRESSED found in some more recent GLIBC elf.h headers.
This fixes the firt part of #190.
Signed-off-by: Stephen Webb <[email protected]>
Signed-off-by: Wen Yang <[email protected]>
Diffstat (limited to 'deps')
| -rw-r--r-- | deps/libunwind/src/dwarf/Gfind_proc_info-lsb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/deps/libunwind/src/dwarf/Gfind_proc_info-lsb.c b/deps/libunwind/src/dwarf/Gfind_proc_info-lsb.c index 678c80b..2062efc 100644 --- a/deps/libunwind/src/dwarf/Gfind_proc_info-lsb.c +++ b/deps/libunwind/src/dwarf/Gfind_proc_info-lsb.c @@ -127,6 +127,7 @@ load_debug_frame (const char *file, char **buf, size_t *bufsize, int is_local) return 1; } +#if defined(SHF_COMPRESSED) if (shdr->sh_flags & SHF_COMPRESSED) { unsigned long destSize; @@ -161,6 +162,7 @@ load_debug_frame (const char *file, char **buf, size_t *bufsize, int is_local) } else { +#endif *bufsize = shdr->sh_size; GET_MEMORY(*buf, *bufsize); @@ -168,7 +170,9 @@ load_debug_frame (const char *file, char **buf, size_t *bufsize, int is_local) Debug (4, "read %zd bytes of .debug_frame from offset %zd\n", *bufsize, shdr->sh_offset); +#if defined(SHF_COMPRESSED) } +#endif munmap(ei.image, ei.size); return 0; } |
