diff options
Diffstat (limited to 'gold/fileread.cc')
-rw-r--r-- | gold/fileread.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gold/fileread.cc b/gold/fileread.cc index 883f8c8..72abd6b 100644 --- a/gold/fileread.cc +++ b/gold/fileread.cc @@ -191,6 +191,19 @@ File_read::release() this->released_ = true; } +// Claim the file for a plugin. This effectively releases the file without +// closing it; the plugin will assume responsibility for closing it. + +void +File_read::claim_for_plugin() +{ + gold_assert(this->is_locked()); + claim_descriptor_for_plugin(this->descriptor_); + this->descriptor_ = -1; + this->is_descriptor_opened_ = false; + this->released_ = true; +} + // Lock the file. void |