summaryrefslogtreecommitdiffstats
path: root/gold/archive.h
diff options
context:
space:
mode:
Diffstat (limited to 'gold/archive.h')
-rw-r--r--gold/archive.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/gold/archive.h b/gold/archive.h
index 33a7233a9a..4f4c7f3306 100644
--- a/gold/archive.h
+++ b/gold/archive.h
@@ -115,6 +115,14 @@ class Archive
off_t offset;
};
+ // A simple hash code for off_t values.
+ class Seen_hash
+ {
+ public:
+ size_t operator()(off_t val) const
+ { return static_cast<size_t>(val); }
+ };
+
// Name of object as printed to user.
std::string name_;
// For reading the file.
@@ -123,6 +131,11 @@ class Archive
std::vector<Armap_entry> armap_;
// The extended name table.
std::string extended_names_;
+ // Track which symbols in the archive map are for elements which are
+ // defined or which have already been included in the link.
+ std::vector<bool> armap_checked_;
+ // Track which elements have been included by offset.
+ Unordered_set<off_t, Seen_hash> seen_offsets_;
};
// This class is used to read an archive and pick out the desired
OpenPOWER on IntegriCloud