aboutsummaryrefslogtreecommitdiff
path: root/gold/archive.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-09-20 05:56:14 +0000
committerIan Lance Taylor <iant@google.com>2007-09-20 05:56:14 +0000
commita93d6d0708cec0f69b8aaa28c847dd43195fe106 (patch)
treebd5fdc9f5a4c2a07a201dd58b359b1a3c764acc7 /gold/archive.h
parente243ffc6679a8e119e2e6041e507c234e90bc796 (diff)
downloadgdb-a93d6d0708cec0f69b8aaa28c847dd43195fe106.zip
gdb-a93d6d0708cec0f69b8aaa28c847dd43195fe106.tar.gz
gdb-a93d6d0708cec0f69b8aaa28c847dd43195fe106.tar.bz2
Rework patch to check by both armap entry and archive offset. Also,
preserve information for --group.
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 33a7233..4f4c7f3 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