diff options
author | Stephen Webb <swebb@blackberry.com> | 2020-06-23 16:48:07 -0400 |
---|---|---|
committer | Dave Watson <dade.watson@gmail.com> | 2020-07-02 16:06:54 -0700 |
commit | d9b061db93d777650d7d16b5ce687639a84a22c0 (patch) | |
tree | 4a7f9a53d5681281f1724f71d09c10cd23dd28c5 | |
parent | 0ce3bf0f3608b310401d9c49fb3f8562d0133cf5 (diff) | |
download | libunwind-d9b061db93d777650d7d16b5ce687639a84a22c0.tar.gz |
Make SHF_COMPRESSED use contingent on its existence
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 <swebb@blackberry.com>
-rw-r--r-- | src/dwarf/Gfind_proc_info-lsb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dwarf/Gfind_proc_info-lsb.c b/src/dwarf/Gfind_proc_info-lsb.c index 0cfb4d4f..7ab60a3f 100644 --- a/src/dwarf/Gfind_proc_info-lsb.c +++ b/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; } |