Change all callers.
(Input_file::open_binary): Likewise.
* script.cc (read_input_script): Likewise.
* readsyms.h (class Read_symbols): Remove options_ field. Remove
options parameter from constructor. Change all callers.
(class Read_script): Likewise.
* fileread.h (class Input_file): Update declarations.
* script.h (read_input_script): Update declaration.
+2009-03-13 Ian Lance Taylor <iant@google.com>
+
+ * fileread.cc (Input_file::open): Remove options parameter.
+ Change all callers.
+ (Input_file::open_binary): Likewise.
+ * script.cc (read_input_script): Likewise.
+ * readsyms.h (class Read_symbols): Remove options_ field. Remove
+ options parameter from constructor. Change all callers.
+ (class Read_script): Likewise.
+ * fileread.h (class Input_file): Update declarations.
+ * script.h (read_input_script): Update declaration.
+
2009-03-10 Nick Clifton <nickc@redhat.com>
* po/es.po: New Spanish translation.
new Input_file_argument(member_name->c_str(), false, "", false,
parameters->options());
*input_file = new Input_file(input_file_arg);
- if (!(*input_file)->open(parameters->options(), *this->dirpath_,
- this->task_))
+ if (!(*input_file)->open(*this->dirpath_, this->task_))
return false;
arch = new Archive(*member_name, *input_file, false, this->dirpath_,
this->task_);
new Input_file_argument(member_name->c_str(), false, "", false,
this->input_file_->options());
*input_file = new Input_file(input_file_arg);
- if (!(*input_file)->open(parameters->options(), *this->dirpath_,
- this->task_))
+ if (!(*input_file)->open(*this->dirpath_, this->task_))
return false;
*memoff = 0;
// the file location, rather than the current directory.
bool
-Input_file::open(const General_options& options, const Dirsearch& dirpath,
- const Task* task)
+Input_file::open(const Dirsearch& dirpath, const Task* task)
{
std::string name;
std::string n1("lib");
n1 += this->input_argument_->name();
std::string n2;
- if (options.is_static()
+ if (parameters->options().is_static()
|| !this->input_argument_->options().Bdynamic())
n1 += ".a";
else
else
{
gold_assert(format == General_options::OBJECT_FORMAT_BINARY);
- ok = this->open_binary(options, task, name);
+ ok = this->open_binary(task, name);
}
if (!ok)
// Open a file for --format binary.
bool
-Input_file::open_binary(const General_options&,
- const Task* task, const std::string& name)
+Input_file::open_binary(const Task* task, const std::string& name)
{
// In order to open a binary file, we need machine code, size, and
// endianness. We may not have a valid target at this point, in
// Open the file. If the open fails, this will report an error and
// return false.
bool
- open(const General_options&, const Dirsearch&, const Task*);
+ open(const Dirsearch&, const Task*);
// Return the name given by the user. For -lc this will return "c".
const char*
// Open a binary file.
bool
- open_binary(const General_options&, const Task* task,
- const std::string& name);
+ open_binary(const Task* task, const std::string& name);
// The argument from the command line.
const Input_file_argument* input_argument_;
{
Task_token* next_blocker = new Task_token(true);
next_blocker->add_blocker();
- workqueue->queue(new Read_symbols(options, input_objects, symtab, layout,
+ workqueue->queue(new Read_symbols(input_objects, symtab, layout,
&search_path, mapfile, &*p, NULL,
this_blocker, next_blocker));
this_blocker = next_blocker;
Input_argument* input_argument = new Input_argument(file);
Task_token* next_blocker = new Task_token(true);
next_blocker->add_blocker();
- this->workqueue_->queue_soon(new Read_symbols(this->options_,
- this->input_objects_,
+ this->workqueue_->queue_soon(new Read_symbols(this->input_objects_,
this->symtab_,
this->layout_,
this->dirpath_,
}
Input_file* input_file = new Input_file(&this->input_argument_->file());
- if (!input_file->open(this->options_, *this->dirpath_, this))
+ if (!input_file->open(*this->dirpath_, this))
return false;
// Read enough of the file to pick up the entire ELF header.
// read multiple scripts simultaneously, which could lead to
// unpredictable changes to the General_options structure.
- workqueue->queue_soon(new Read_script(this->options_,
- this->symtab_,
+ workqueue->queue_soon(new Read_script(this->symtab_,
this->layout_,
this->dirpath_,
this->input_objects_,
Task_token* next_blocker = new Task_token(true);
next_blocker->add_blocker();
- workqueue->queue_soon(new Read_symbols(this->options_,
- this->input_objects_,
+ workqueue->queue_soon(new Read_symbols(this->input_objects_,
this->symtab_, this->layout_,
this->dirpath_, this->mapfile_,
arg, input_group,
Read_script::run(Workqueue* workqueue)
{
bool used_next_blocker;
- if (!read_input_script(workqueue, this->options_, this->symtab_,
- this->layout_, this->dirpath_, this->input_objects_,
+ if (!read_input_script(workqueue, this->symtab_, this->layout_,
+ this->dirpath_, this->input_objects_,
this->mapfile_, this->input_group_,
this->input_argument_, this->input_file_,
this->next_blocker_, &used_next_blocker))
// one has completed; it will be NULL for the first task.
// NEXT_BLOCKER is used to block the next input file from adding
// symbols.
- Read_symbols(const General_options& options, Input_objects* input_objects,
- Symbol_table* symtab, Layout* layout, Dirsearch* dirpath,
- Mapfile* mapfile, const Input_argument* input_argument,
+ Read_symbols(Input_objects* input_objects, Symbol_table* symtab,
+ Layout* layout, Dirsearch* dirpath, Mapfile* mapfile,
+ const Input_argument* input_argument,
Input_group* input_group, Task_token* this_blocker,
Task_token* next_blocker)
- : options_(options), input_objects_(input_objects), symtab_(symtab),
- layout_(layout), dirpath_(dirpath), mapfile_(mapfile),
- input_argument_(input_argument), input_group_(input_group),
- this_blocker_(this_blocker), next_blocker_(next_blocker)
+ : input_objects_(input_objects), symtab_(symtab), layout_(layout),
+ dirpath_(dirpath), mapfile_(mapfile), input_argument_(input_argument),
+ input_group_(input_group), this_blocker_(this_blocker),
+ next_blocker_(next_blocker)
{ }
~Read_symbols();
bool
do_read_symbols(Workqueue*);
- const General_options& options_;
Input_objects* input_objects_;
Symbol_table* symtab_;
Layout* layout_;
class Read_script : public Task
{
public:
- Read_script(const General_options& options, Symbol_table* symtab,
- Layout* layout, Dirsearch* dirpath, Input_objects* input_objects,
- Mapfile* mapfile, Input_group* input_group,
- const Input_argument* input_argument,
+ Read_script(Symbol_table* symtab, Layout* layout, Dirsearch* dirpath,
+ Input_objects* input_objects, Mapfile* mapfile,
+ Input_group* input_group, const Input_argument* input_argument,
Input_file* input_file, Task_token* this_blocker,
Task_token* next_blocker)
- : options_(options), symtab_(symtab), layout_(layout), dirpath_(dirpath),
+ : symtab_(symtab), layout_(layout), dirpath_(dirpath),
input_objects_(input_objects), mapfile_(mapfile),
input_group_(input_group), input_argument_(input_argument),
input_file_(input_file), this_blocker_(this_blocker),
get_name() const;
private:
- const General_options& options_;
Symbol_table* symtab_;
Layout* layout_;
Dirsearch* dirpath_;
// as a script. Return true if the file was handled.
bool
-read_input_script(Workqueue* workqueue, const General_options& options,
- Symbol_table* symtab, Layout* layout,
+read_input_script(Workqueue* workqueue, Symbol_table* symtab, Layout* layout,
Dirsearch* dirsearch, Input_objects* input_objects,
Mapfile* mapfile, Input_group* input_group,
const Input_argument* input_argument,
nb = new Task_token(true);
nb->add_blocker();
}
- workqueue->queue_soon(new Read_symbols(options, input_objects, symtab,
+ workqueue->queue_soon(new Read_symbols(input_objects, symtab,
layout, dirsearch, mapfile, &*p,
input_group, this_blocker, nb));
this_blocker = nb;
posdep.set_format_enum(General_options::OBJECT_FORMAT_ELF);
Input_file_argument input_argument(filename, false, "", false, posdep);
Input_file input_file(&input_argument);
- if (!input_file.open(cmdline->options(), dirsearch, task))
+ if (!input_file.open(dirsearch, task))
return false;
std::string input_string;
// whether the function took over NEXT_BLOCKER.
bool
-read_input_script(Workqueue*, const General_options&, Symbol_table*, Layout*,
- Dirsearch*, Input_objects*, Mapfile*, Input_group*,
+read_input_script(Workqueue*, Symbol_table*, Layout*, Dirsearch*,
+ Input_objects*, Mapfile*, Input_group*,
const Input_argument*, Input_file*,
Task_token* next_blocker, bool* used_next_blocker);