From 6744bcad05396a5901149a202270e523e454769d Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 30 Aug 2019 07:46:15 -0700 Subject: [PATCH] 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. --- bfd/ChangeLog | 6 ++++++ bfd/archive.c | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d292e87..bb99231 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 3baf83d..690718e 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; } -- 2.7.4