aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 396b56d..d496c1b 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1260,6 +1260,18 @@ _bfd_elf_make_section_from_shdr (bfd *abfd,
abfd, name);
return false;
}
+#ifndef HAVE_ZSTD
+ if (newsect->compress_status == DECOMPRESS_SECTION_ZSTD)
+ {
+ _bfd_error_handler
+ /* xgettext:c-format */
+ (_ ("%pB: section %s is compressed with zstd, but BFD "
+ "is not built with zstd support"),
+ abfd, name);
+ newsect->compress_status = COMPRESS_SECTION_NONE;
+ return false;
+ }
+#endif
}
if (abfd->is_linker_input)