_bfd_get_elt_at_filepos failed to copy BFD_COMPRESS, BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive. This patch fixes it: diff --git a/bfd/archive.c b/bfd/archive.c index 3baf83d40c..690718e949 100644 --- a/bfd/archive.c +++ b/bfd/archive.c @@ -692,6 +692,13 @@ _bfd_get_elt_at_filepos (bfd *archive, file_ptr filepos) return NULL; } n_bfd->proxy_origin = bfd_tell (archive); + + /* Copy BFD_COMPRESS, BFD_DECOMPRESS and BFD_COMPRESS_GABI + flags. */ + n_bfd->flags |= archive->flags & (BFD_COMPRESS + | BFD_DECOMPRESS + | BFD_COMPRESS_GABI); + return n_bfd; }
The master branch has been updated by H.J. Lu <hjl@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6744bcad05396a5901149a202270e523e454769d commit 6744bcad05396a5901149a202270e523e454769d Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Aug 30 07:46:15 2019 -0700 Copy BFD_COMPRESS/BFD_DECOMPRESS/BFD_COMPRESS_GABI for thin archive We need to copy BFD_COMPRESS, BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive. PR ld/24951 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS, BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
Fixed for 2.33