aboutsummaryrefslogtreecommitdiff
path: root/bfd/archive.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2019-08-30 07:46:15 -0700
committerH.J. Lu <hjl.tools@gmail.com>2019-08-30 07:46:27 -0700
commit6744bcad05396a5901149a202270e523e454769d (patch)
treebe6fb48126d26bd3d20447ba470a4bb7d6146758 /bfd/archive.c
parent1c1e0fe58b9389bd40f5f642d20dc2e1befd4541 (diff)
downloadgdb-6744bcad05396a5901149a202270e523e454769d.zip
gdb-6744bcad05396a5901149a202270e523e454769d.tar.gz
gdb-6744bcad05396a5901149a202270e523e454769d.tar.bz2
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.
Diffstat (limited to 'bfd/archive.c')
-rw-r--r--bfd/archive.c7
1 files changed, 7 insertions, 0 deletions
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;
}