From: H.J. Lu Date: Fri, 30 Aug 2019 14:46:15 +0000 (-0700) Subject: Copy BFD_COMPRESS/BFD_DECOMPRESS/BFD_COMPRESS_GABI for thin archive X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6744bcad05396a5901149a202270e523e454769d;p=binutils-gdb.git 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d292e87f56b..bb99231c644 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2019-08-30 H.J. Lu + + PR ld/24951 + * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS, + BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive. + 2019-08-29 Alan Modra PR 24697 diff --git a/bfd/archive.c b/bfd/archive.c index 3baf83d40ca..690718e9494 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; }