aboutsummaryrefslogtreecommitdiff
path: root/gold/object.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2006-09-26 21:00:34 +0000
committerIan Lance Taylor <iant@google.com>2006-09-26 21:00:34 +0000
commit54dc6425456514cdc00cdfef5a21a7bdacfcad2d (patch)
treea0cf4cee57e8ed1f2cd9c938febf6966cfa69920 /gold/object.h
parent41f8ce693c4a04811bf47a8df83c1a376a9f34f4 (diff)
downloadgdb-54dc6425456514cdc00cdfef5a21a7bdacfcad2d.zip
gdb-54dc6425456514cdc00cdfef5a21a7bdacfcad2d.tar.gz
gdb-54dc6425456514cdc00cdfef5a21a7bdacfcad2d.tar.bz2
More section layout code.
Diffstat (limited to 'gold/object.h')
-rw-r--r--gold/object.h40
1 files changed, 38 insertions, 2 deletions
diff --git a/gold/object.h b/gold/object.h
index 0026531..eb3271e 100644
--- a/gold/object.h
+++ b/gold/object.h
@@ -25,6 +25,8 @@ struct Read_symbols_data
File_view* symbols;
// Size of symbol data in bytes.
off_t symbols_size;
+ // Index of first global symbol.
+ unsigned int first_global;
// Symbol names.
File_view* symbol_names;
// Size of symbol name data in bytes.
@@ -274,9 +276,43 @@ class Sized_object : public Object
Symbol** symbols_;
};
-// The type of the list of input objects.
+// A class to manage the list of all objects.
-typedef std::list<Object*> Object_list;
+class Input_objects
+{
+ public:
+ Input_objects()
+ : object_list_()
+ { }
+
+ // The type of the list of input objects.
+ typedef std::list<Object*> Object_list;
+
+ // Add an object to the list.
+ void
+ add_object(Object*);
+
+ // Iterate over all objects.
+ Object_list::const_iterator
+ begin() const
+ { return this->object_list_.begin(); }
+
+ Object_list::const_iterator
+ end() const
+ { return this->object_list_.end(); }
+
+ // Return whether we have seen any dynamic objects.
+ bool
+ any_dynamic() const
+ { return this->any_dynamic_; }
+
+ private:
+ Input_objects(const Input_objects&);
+ Input_objects& operator=(const Input_objects&);
+
+ Object_list object_list_;
+ bool any_dynamic_;
+};
// Return an Object appropriate for the input file. P is BYTES long,
// and holds the ELF header.