diff options
author | Chris Demetriou <cgd@google.com> | 2009-10-10 07:39:04 +0000 |
---|---|---|
committer | Chris Demetriou <cgd@google.com> | 2009-10-10 07:39:04 +0000 |
commit | ae3b518947927146c76511c985cb372b2afab0da (patch) | |
tree | 813e1f1406d9851bf09a3f8ee622b93d7d37dc92 /gold/testsuite/searched_file_test_lib.cc | |
parent | f08036905689c42e7d27f72c8a22c82812d23597 (diff) | |
download | ppe42-binutils-ae3b518947927146c76511c985cb372b2afab0da.tar.gz ppe42-binutils-ae3b518947927146c76511c985cb372b2afab0da.zip |
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/testsuite/searched_file_test_lib.cc')
-rw-r--r-- | gold/testsuite/searched_file_test_lib.cc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gold/testsuite/searched_file_test_lib.cc b/gold/testsuite/searched_file_test_lib.cc new file mode 100644 index 0000000000..0686e520a1 --- /dev/null +++ b/gold/testsuite/searched_file_test_lib.cc @@ -0,0 +1,27 @@ +// searched_file_test_lib.cc -- test -l:foo.a for gold + +// Copyright 2009 Free Software Foundation, Inc. +// Written by Chris Demetriou <cgd@google.com>. + +// This file is part of gold. + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, +// MA 02110-1301, USA. + +// The Linux kernel builds an object file using a linker script, and +// then links against that object file using the -R option. This is a +// test for that usage. + +int zero_from_lib = 0; |