aboutsummaryrefslogtreecommitdiff
path: root/gold/fileread.h
diff options
context:
space:
mode:
Diffstat (limited to 'gold/fileread.h')
-rw-r--r--gold/fileread.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/gold/fileread.h b/gold/fileread.h
index 4236ce0..1b776f1 100644
--- a/gold/fileread.h
+++ b/gold/fileread.h
@@ -109,6 +109,11 @@ class File_read
void
release();
+ // Claim the file for a plugin. This effectively releases the file without
+ // closing it; the plugin will assume responsibility for closing it.
+ void
+ claim_for_plugin();
+
// Return the size of the file.
off_t
filesize() const
@@ -183,6 +188,14 @@ class File_read
static void
print_stats();
+ // Return the open file descriptor (for plugins).
+ int
+ descriptor() const
+ {
+ gold_assert(this->descriptor_ >= 0);
+ return this->descriptor_;
+ }
+
private:
// This class may not be copied.
File_read(const File_read&);