aboutsummaryrefslogtreecommitdiff
path: root/gold/object.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2009-02-28 04:39:57 +0000
committerIan Lance Taylor <ian@airs.com>2009-02-28 04:39:57 +0000
commitfd9d194f0467de25e3d6e6131d641f179d7eb289 (patch)
treec99595f96a991235d7001c53d9ba332abae711a4 /gold/object.h
parent61edd21fa41ccf31fe391ee320c4812c4d45486a (diff)
downloadgdb-fd9d194f0467de25e3d6e6131d641f179d7eb289.zip
gdb-fd9d194f0467de25e3d6e6131d641f179d7eb289.tar.gz
gdb-fd9d194f0467de25e3d6e6131d641f179d7eb289.tar.bz2
PR 6811
* options.h (class Search_directory): Add is_system_directory. (class General_options): Declare is_in_system_directory. * options.cc (get_relative_sysroot): Make static. (get_default_sysroot): Make static. (General_optoins::is_in_system_directory): New function. * fileread.cc (Input_file::is_in_system_directory): New function. * fileread.h (class Input_file): Declare is_in_system_directory. * object.h (class Object): Add is_in_system_directory. (class Input_objects): Remove system_library_directory_ field. * object.cc (Input_objects::add_object): Don't set system_library_directory_. (input_objects::found_in_system_library_directory): Remove. * symtab.cc (Symbol_table::write_globals): Remove input_objects parameter. Change all callers. (Symbol_table::sized_write_globals): Likewise. (Symbol_table::warn_about_undefined_dynobj_symbol): Likewise. Call Object::is_in_system_directory. * symtab.h (class Symbol_table): Update declarations.
Diffstat (limited to 'gold/object.h')
-rw-r--r--gold/object.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/gold/object.h b/gold/object.h
index 6efc0fe..9e4c66f 100644
--- a/gold/object.h
+++ b/gold/object.h
@@ -444,6 +444,11 @@ class Object
set_target(Target* target)
{ this->target_ = target; }
+ // Return whether this object was found in a system directory.
+ bool
+ is_in_system_directory() const
+ { return this->input_file()->is_in_system_directory(); }
+
protected:
// Returns NULL for Objects that are not plugin objects. This method
// is overridden in the Pluginobj class.
@@ -1832,8 +1837,7 @@ class Input_objects
{
public:
Input_objects()
- : relobj_list_(), dynobj_list_(), sonames_(), system_library_directory_(),
- cref_(NULL)
+ : relobj_list_(), dynobj_list_(), sonames_(), cref_(NULL)
{ }
// The type of the list of input relocateable objects.
@@ -1911,8 +1915,6 @@ class Input_objects
Dynobj_list dynobj_list_;
// SONAMEs that we have seen.
Unordered_set<std::string> sonames_;
- // The directory in which we find the libc.so.
- std::string system_library_directory_;
// Manage cross-references if requested.
Cref* cref_;
};