aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/bfd.c')
-rw-r--r--bfd/bfd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/bfd.c b/bfd/bfd.c
index af2c192..b3078ea 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -2635,7 +2635,7 @@ bfd_check_compression_header (bfd *abfd, bfd_byte *contents,
chdr.ch_addralign = bfd_get_64 (abfd, &echdr->ch_addralign);
}
if (chdr.ch_type == ELFCOMPRESS_ZLIB
- && chdr.ch_addralign == (1U << bfd_log2 (chdr.ch_addralign)))
+ && chdr.ch_addralign == (chdr.ch_addralign & -chdr.ch_addralign))
{
*uncompressed_size = chdr.ch_size;
*uncompressed_alignment_power = bfd_log2 (chdr.ch_addralign);