This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] Copy BFD_COMPRESS/BFD_DECOMPRESS/BFD_COMPRESS_GABI for thin archive
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: binutils at sourceware dot org
- Date: Thu, 29 Aug 2019 13:03:26 -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/archive.c | 7 +++++++
1 file changed, 7 insertions(+)
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;
}
--
2.20.1