This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] [gold] Unlock external members of thin archives.
- From: Peter Collingbourne <pcc at google dot com>
- To: binutils at sourceware dot org
- Cc: Peter Collingbourne <pcc at google dot com>
- Date: Wed, 28 Jan 2015 14:26:32 -0800
- Subject: [PATCH] [gold] Unlock external members of thin archives.
- Authentication-results: sourceware.org; auth=none
gold/
* archive.cc (Archive::get_elf_object_for_member): Unlock external
members of thin archives so that they may be used by plugins.
---
gold/ChangeLog | 5 +++++
gold/archive.cc | 6 ++++++
2 files changed, 11 insertions(+)
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 946504a..c3ea98d 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-27 Peter Collingbourne <pcc@google.com>
+
+ * archive.cc (Archive::get_elf_object_for_member): Unlock external
+ members of thin archives so that they may be used by plugins.
+
2015-01-25 Cary Coutant <ccoutant@google.com>
* output.cc (Output_segment::set_section_addresses): Fix calculation
diff --git a/gold/archive.cc b/gold/archive.cc
index 69107f5..949514a 100644
--- a/gold/archive.cc
+++ b/gold/archive.cc
@@ -692,6 +692,12 @@ Archive::get_elf_object_for_member(off_t off, bool* punconfigured)
// Delete its elf object.
if (obj != NULL)
delete obj;
+
+ // If this is an external member of a thin archive, unlock the
+ // file.
+ if (this->is_thin_archive_)
+ input_file->file().unlock(this->task_);
+
return plugin_obj;
}
}
--
2.2.0.rc0.207.ga3a616c