diff options
Diffstat (limited to 'gold')
-rw-r--r-- | gold/ChangeLog | 12 | ||||
-rw-r--r-- | gold/archive.cc | 6 | ||||
-rw-r--r-- | gold/fileread.cc | 10 | ||||
-rw-r--r-- | gold/fileread.h | 5 | ||||
-rw-r--r-- | gold/gold.cc | 2 | ||||
-rw-r--r-- | gold/plugin.cc | 3 | ||||
-rw-r--r-- | gold/readsyms.cc | 12 | ||||
-rw-r--r-- | gold/readsyms.h | 25 | ||||
-rw-r--r-- | gold/script.cc | 7 | ||||
-rw-r--r-- | gold/script.h | 4 |
10 files changed, 43 insertions, 43 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index 32467b5..4e20de0 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,15 @@ +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. diff --git a/gold/archive.cc b/gold/archive.cc index 6c4a36c..33a752e 100644 --- a/gold/archive.cc +++ b/gold/archive.cc @@ -482,8 +482,7 @@ Archive::get_file_and_offset(off_t off, Input_objects* input_objects, 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_); @@ -502,8 +501,7 @@ Archive::get_file_and_offset(off_t off, Input_objects* input_objects, 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; diff --git a/gold/fileread.cc b/gold/fileread.cc index 13442ff..98ba3be 100644 --- a/gold/fileread.cc +++ b/gold/fileread.cc @@ -766,8 +766,7 @@ Input_file::just_symbols() const // 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; @@ -789,7 +788,7 @@ Input_file::open(const General_options& options, const Dirsearch& dirpath, 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 @@ -845,7 +844,7 @@ Input_file::open(const General_options& options, const Dirsearch& dirpath, else { gold_assert(format == General_options::OBJECT_FORMAT_BINARY); - ok = this->open_binary(options, task, name); + ok = this->open_binary(task, name); } if (!ok) @@ -861,8 +860,7 @@ Input_file::open(const General_options& options, const Dirsearch& dirpath, // 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 diff --git a/gold/fileread.h b/gold/fileread.h index 1c0969c..365e7ad 100644 --- a/gold/fileread.h +++ b/gold/fileread.h @@ -434,7 +434,7 @@ class Input_file // 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* @@ -485,8 +485,7 @@ class Input_file // 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_; diff --git a/gold/gold.cc b/gold/gold.cc index 818a346..5afdcb0 100644 --- a/gold/gold.cc +++ b/gold/gold.cc @@ -182,7 +182,7 @@ queue_initial_tasks(const General_options& options, { 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; diff --git a/gold/plugin.cc b/gold/plugin.cc index 4550371..392407c 100644 --- a/gold/plugin.cc +++ b/gold/plugin.cc @@ -407,8 +407,7 @@ Plugin_manager::add_input_file(char *pathname) 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_, diff --git a/gold/readsyms.cc b/gold/readsyms.cc index 8954837..4e126e7 100644 --- a/gold/readsyms.cc +++ b/gold/readsyms.cc @@ -139,7 +139,7 @@ Read_symbols::do_read_symbols(Workqueue* workqueue) } 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. @@ -258,8 +258,7 @@ Read_symbols::do_read_symbols(Workqueue* workqueue) // 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_, @@ -296,8 +295,7 @@ Read_symbols::do_group(Workqueue* workqueue) 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, @@ -491,8 +489,8 @@ void 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)) diff --git a/gold/readsyms.h b/gold/readsyms.h index f93d6db..c8ac6cc 100644 --- a/gold/readsyms.h +++ b/gold/readsyms.h @@ -54,15 +54,15 @@ class Read_symbols : public Task // 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(); @@ -90,7 +90,6 @@ class Read_symbols : public Task bool do_read_symbols(Workqueue*); - const General_options& options_; Input_objects* input_objects_; Symbol_table* symtab_; Layout* layout_; @@ -230,13 +229,12 @@ class Finish_group : public Task 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), @@ -260,7 +258,6 @@ class Read_script : public Task get_name() const; private: - const General_options& options_; Symbol_table* symtab_; Layout* layout_; Dirsearch* dirpath_; diff --git a/gold/script.cc b/gold/script.cc index 442c412..4462c95 100644 --- a/gold/script.cc +++ b/gold/script.cc @@ -1321,8 +1321,7 @@ class Parser_closure // 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, @@ -1363,7 +1362,7 @@ read_input_script(Workqueue* workqueue, const General_options& options, 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; @@ -1398,7 +1397,7 @@ read_script_file(const char* filename, Command_line* cmdline, 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; diff --git a/gold/script.h b/gold/script.h index 6d65989..b141f6e 100644 --- a/gold/script.h +++ b/gold/script.h @@ -389,8 +389,8 @@ class Script_options // 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); |