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.
This commit is contained in:
H.J. Lu 2019-08-30 07:46:15 -07:00
parent 1c1e0fe58b
commit 6744bcad05
2 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
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 <amodra@gmail.com>
PR 24697

View File

@ -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;
}