summaryrefslogtreecommitdiff
path: root/gold/merge.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-11-27 06:13:33 +0000
committerIan Lance Taylor <iant@google.com>2007-11-27 06:13:33 +0000
commit8c87ab19d8f180af4af760910e841f0b6bf7fb2d (patch)
tree3f152cf7bf85ebcb78a63484f46bf7fe87d322ba /gold/merge.h
parent8cb26f8f7a13f6f010ba9dd77a5f1afe7c6cb02e (diff)
downloadbinutils-redhat-8c87ab19d8f180af4af760910e841f0b6bf7fb2d.tar.gz
Rework merge_map for speed.
Diffstat (limited to 'gold/merge.h')
-rw-r--r--gold/merge.h32
1 files changed, 2 insertions, 30 deletions
diff --git a/gold/merge.h b/gold/merge.h
index 1f750c5477..ad009973fc 100644
--- a/gold/merge.h
+++ b/gold/merge.h
@@ -32,13 +32,13 @@ namespace gold
{
// This class manages mappings from input sections to offsets in an
-// output section. This is used where input sections are merged.
+// output section. This is used where input sections are merged. The
+// actual data is stored in fields in Object.
class Merge_map
{
public:
Merge_map()
- : merge_map_()
{ }
// Add a mapping for the bytes from OFFSET to OFFSET + LENGTH in the
@@ -57,34 +57,6 @@ class Merge_map
bool
get_output_offset(const Relobj* object, unsigned int shndx, off_t offset,
off_t *output_offset) const;
-
- private:
- // We build a mapping from OBJECT/SHNDX/OFFSET to an offset and
- // length in the output section.
- struct Merge_key
- {
- const Relobj* object;
- unsigned int shndx;
- off_t offset;
- };
-
- struct Merge_key_less
- {
- inline bool
- operator()(const Merge_key&, const Merge_key&) const;
- };
-
- struct Merge_value
- {
- off_t length;
- off_t output_offset;
- };
-
- typedef std::map<Merge_key, Merge_value, Merge_key_less> Merge_mapping;
-
- // A mapping from input object/section/offset to offset in output
- // section.
- Merge_mapping merge_map_;
};
// A general class for SHF_MERGE data, to hold functions shared by