diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2019-08-30 07:46:15 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2019-08-30 07:46:27 -0700 |
commit | 6744bcad05396a5901149a202270e523e454769d (patch) | |
tree | be6fb48126d26bd3d20447ba470a4bb7d6146758 | |
parent | 1c1e0fe58b9389bd40f5f642d20dc2e1befd4541 (diff) | |
download | gdb-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.
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/archive.c | 7 |
2 files changed, 13 insertions, 0 deletions
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 <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 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; } |