summaryrefslogtreecommitdiff
path: root/gold/archive.cc
diff options
context:
space:
mode:
authorChris Demetriou <cgd@google.com>2009-10-10 07:39:04 +0000
committerChris Demetriou <cgd@google.com>2009-10-10 07:39:04 +0000
commitae3b518947927146c76511c985cb372b2afab0da (patch)
tree813e1f1406d9851bf09a3f8ee622b93d7d37dc92 /gold/archive.cc
parentf08036905689c42e7d27f72c8a22c82812d23597 (diff)
downloadbinutils-gdb-ae3b518947927146c76511c985cb372b2afab0da.tar.gz
2009-10-10 Chris Demetriou <cgd@google.com>
* options.h (Input_file_argument::Input_file_type): New enum. (Input_file_argument::is_lib_): Replace with... (Input_file_argument::type_): New member. (Input_file_argument::Input_file_argument): Take Input_file_type 'type' rather than boolean 'is_lib' as second argument. (Input_file_argument::is_lib): Use type_. (Input_file_argument::is_searched_file): New function. (Input_file_argument::may_need_search): Handle is_searched_file. * options.cc (General_options::parse_library): Support -l:filename. (General_options::parse_just_symbols): Update for Input_file_argument changes. (Command_line::process): Likewise. * archive.cc (Archive::get_file_and_offset): Likewise. * plugin.cc (Plugin_manager::release_input_file): Likewise. * script.cc (read_script_file, script_add_file): Likewise. * fileread.cc (Input_file::Input_file): Likewise. (Input_file::will_search_for): Handle is_searched_file. (Input_file::open): Likewise. * readsyms.cc (Read_symbols::get_name): Likewise. * testsuite/Makefile.am (searched_file_test): New test. * testsuite/Makefile.in: Regenerate. * testsuite/searched_file_test.cc: New file. * testsuite/searched_file_test_lib.cc: New file.
Diffstat (limited to 'gold/archive.cc')
-rw-r--r--gold/archive.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/gold/archive.cc b/gold/archive.cc
index c3fb20fbf28..569a491ae1a 100644
--- a/gold/archive.cc
+++ b/gold/archive.cc
@@ -489,8 +489,9 @@ Archive::get_file_and_offset(off_t off, Input_file** input_file, off_t* memoff,
else
{
Input_file_argument* input_file_arg =
- new Input_file_argument(member_name->c_str(), false, "", false,
- parameters->options());
+ new Input_file_argument(member_name->c_str(),
+ Input_file_argument::INPUT_FILE_TYPE_FILE,
+ "", false, parameters->options());
*input_file = new Input_file(input_file_arg);
int dummy = 0;
if (!(*input_file)->open(*this->dirpath_, this->task_, &dummy))
@@ -509,8 +510,9 @@ Archive::get_file_and_offset(off_t off, Input_file** input_file, off_t* memoff,
// This is an external member of a thin archive. Open the
// file as a regular relocatable object file.
Input_file_argument* input_file_arg =
- new Input_file_argument(member_name->c_str(), false, "", false,
- this->input_file_->options());
+ new Input_file_argument(member_name->c_str(),
+ Input_file_argument::INPUT_FILE_TYPE_FILE,
+ "", false, this->input_file_->options());
*input_file = new Input_file(input_file_arg);
int dummy = 0;
if (!(*input_file)->open(*this->dirpath_, this->task_, &dummy))