[PATCH] Copy BFD_COMPRESS/BFD_DECOMPRESS/BFD_COMPRESS_GABI for thin archive

H.J. Lu hjl.tools@gmail.com
Thu Aug 29 20:03:00 GMT 2019


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



More information about the Binutils mailing list