mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-11 16:46:14 +08:00
* 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.
This commit is contained in:
@ -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>
|
2009-03-10 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* po/es.po: New Spanish translation.
|
* po/es.po: New Spanish translation.
|
||||||
|
@ -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,
|
new Input_file_argument(member_name->c_str(), false, "", false,
|
||||||
parameters->options());
|
parameters->options());
|
||||||
*input_file = new Input_file(input_file_arg);
|
*input_file = new Input_file(input_file_arg);
|
||||||
if (!(*input_file)->open(parameters->options(), *this->dirpath_,
|
if (!(*input_file)->open(*this->dirpath_, this->task_))
|
||||||
this->task_))
|
|
||||||
return false;
|
return false;
|
||||||
arch = new Archive(*member_name, *input_file, false, this->dirpath_,
|
arch = new Archive(*member_name, *input_file, false, this->dirpath_,
|
||||||
this->task_);
|
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,
|
new Input_file_argument(member_name->c_str(), false, "", false,
|
||||||
this->input_file_->options());
|
this->input_file_->options());
|
||||||
*input_file = new Input_file(input_file_arg);
|
*input_file = new Input_file(input_file_arg);
|
||||||
if (!(*input_file)->open(parameters->options(), *this->dirpath_,
|
if (!(*input_file)->open(*this->dirpath_, this->task_))
|
||||||
this->task_))
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
*memoff = 0;
|
*memoff = 0;
|
||||||
|
@ -766,8 +766,7 @@ Input_file::just_symbols() const
|
|||||||
// the file location, rather than the current directory.
|
// the file location, rather than the current directory.
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Input_file::open(const General_options& options, const Dirsearch& dirpath,
|
Input_file::open(const Dirsearch& dirpath, const Task* task)
|
||||||
const Task* task)
|
|
||||||
{
|
{
|
||||||
std::string name;
|
std::string name;
|
||||||
|
|
||||||
@ -789,7 +788,7 @@ Input_file::open(const General_options& options, const Dirsearch& dirpath,
|
|||||||
std::string n1("lib");
|
std::string n1("lib");
|
||||||
n1 += this->input_argument_->name();
|
n1 += this->input_argument_->name();
|
||||||
std::string n2;
|
std::string n2;
|
||||||
if (options.is_static()
|
if (parameters->options().is_static()
|
||||||
|| !this->input_argument_->options().Bdynamic())
|
|| !this->input_argument_->options().Bdynamic())
|
||||||
n1 += ".a";
|
n1 += ".a";
|
||||||
else
|
else
|
||||||
@ -845,7 +844,7 @@ Input_file::open(const General_options& options, const Dirsearch& dirpath,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
gold_assert(format == General_options::OBJECT_FORMAT_BINARY);
|
gold_assert(format == General_options::OBJECT_FORMAT_BINARY);
|
||||||
ok = this->open_binary(options, task, name);
|
ok = this->open_binary(task, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ok)
|
if (!ok)
|
||||||
@ -861,8 +860,7 @@ Input_file::open(const General_options& options, const Dirsearch& dirpath,
|
|||||||
// Open a file for --format binary.
|
// Open a file for --format binary.
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Input_file::open_binary(const General_options&,
|
Input_file::open_binary(const Task* task, const std::string& name)
|
||||||
const Task* task, const std::string& name)
|
|
||||||
{
|
{
|
||||||
// In order to open a binary file, we need machine code, size, and
|
// 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
|
// endianness. We may not have a valid target at this point, in
|
||||||
|
@ -434,7 +434,7 @@ class Input_file
|
|||||||
// Open the file. If the open fails, this will report an error and
|
// Open the file. If the open fails, this will report an error and
|
||||||
// return false.
|
// return false.
|
||||||
bool
|
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".
|
// Return the name given by the user. For -lc this will return "c".
|
||||||
const char*
|
const char*
|
||||||
@ -485,8 +485,7 @@ class Input_file
|
|||||||
|
|
||||||
// Open a binary file.
|
// Open a binary file.
|
||||||
bool
|
bool
|
||||||
open_binary(const General_options&, const Task* task,
|
open_binary(const Task* task, const std::string& name);
|
||||||
const std::string& name);
|
|
||||||
|
|
||||||
// The argument from the command line.
|
// The argument from the command line.
|
||||||
const Input_file_argument* input_argument_;
|
const Input_file_argument* input_argument_;
|
||||||
|
@ -182,7 +182,7 @@ queue_initial_tasks(const General_options& options,
|
|||||||
{
|
{
|
||||||
Task_token* next_blocker = new Task_token(true);
|
Task_token* next_blocker = new Task_token(true);
|
||||||
next_blocker->add_blocker();
|
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,
|
&search_path, mapfile, &*p, NULL,
|
||||||
this_blocker, next_blocker));
|
this_blocker, next_blocker));
|
||||||
this_blocker = next_blocker;
|
this_blocker = next_blocker;
|
||||||
|
@ -407,8 +407,7 @@ Plugin_manager::add_input_file(char *pathname)
|
|||||||
Input_argument* input_argument = new Input_argument(file);
|
Input_argument* input_argument = new Input_argument(file);
|
||||||
Task_token* next_blocker = new Task_token(true);
|
Task_token* next_blocker = new Task_token(true);
|
||||||
next_blocker->add_blocker();
|
next_blocker->add_blocker();
|
||||||
this->workqueue_->queue_soon(new Read_symbols(this->options_,
|
this->workqueue_->queue_soon(new Read_symbols(this->input_objects_,
|
||||||
this->input_objects_,
|
|
||||||
this->symtab_,
|
this->symtab_,
|
||||||
this->layout_,
|
this->layout_,
|
||||||
this->dirpath_,
|
this->dirpath_,
|
||||||
|
@ -139,7 +139,7 @@ Read_symbols::do_read_symbols(Workqueue* workqueue)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Input_file* input_file = new Input_file(&this->input_argument_->file());
|
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;
|
return false;
|
||||||
|
|
||||||
// Read enough of the file to pick up the entire ELF header.
|
// 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
|
// read multiple scripts simultaneously, which could lead to
|
||||||
// unpredictable changes to the General_options structure.
|
// unpredictable changes to the General_options structure.
|
||||||
|
|
||||||
workqueue->queue_soon(new Read_script(this->options_,
|
workqueue->queue_soon(new Read_script(this->symtab_,
|
||||||
this->symtab_,
|
|
||||||
this->layout_,
|
this->layout_,
|
||||||
this->dirpath_,
|
this->dirpath_,
|
||||||
this->input_objects_,
|
this->input_objects_,
|
||||||
@ -296,8 +295,7 @@ Read_symbols::do_group(Workqueue* workqueue)
|
|||||||
|
|
||||||
Task_token* next_blocker = new Task_token(true);
|
Task_token* next_blocker = new Task_token(true);
|
||||||
next_blocker->add_blocker();
|
next_blocker->add_blocker();
|
||||||
workqueue->queue_soon(new Read_symbols(this->options_,
|
workqueue->queue_soon(new Read_symbols(this->input_objects_,
|
||||||
this->input_objects_,
|
|
||||||
this->symtab_, this->layout_,
|
this->symtab_, this->layout_,
|
||||||
this->dirpath_, this->mapfile_,
|
this->dirpath_, this->mapfile_,
|
||||||
arg, input_group,
|
arg, input_group,
|
||||||
@ -491,8 +489,8 @@ void
|
|||||||
Read_script::run(Workqueue* workqueue)
|
Read_script::run(Workqueue* workqueue)
|
||||||
{
|
{
|
||||||
bool used_next_blocker;
|
bool used_next_blocker;
|
||||||
if (!read_input_script(workqueue, this->options_, this->symtab_,
|
if (!read_input_script(workqueue, this->symtab_, this->layout_,
|
||||||
this->layout_, this->dirpath_, this->input_objects_,
|
this->dirpath_, this->input_objects_,
|
||||||
this->mapfile_, this->input_group_,
|
this->mapfile_, this->input_group_,
|
||||||
this->input_argument_, this->input_file_,
|
this->input_argument_, this->input_file_,
|
||||||
this->next_blocker_, &used_next_blocker))
|
this->next_blocker_, &used_next_blocker))
|
||||||
|
@ -54,15 +54,15 @@ class Read_symbols : public Task
|
|||||||
// one has completed; it will be NULL for the first task.
|
// one has completed; it will be NULL for the first task.
|
||||||
// NEXT_BLOCKER is used to block the next input file from adding
|
// NEXT_BLOCKER is used to block the next input file from adding
|
||||||
// symbols.
|
// symbols.
|
||||||
Read_symbols(const General_options& options, Input_objects* input_objects,
|
Read_symbols(Input_objects* input_objects, Symbol_table* symtab,
|
||||||
Symbol_table* symtab, Layout* layout, Dirsearch* dirpath,
|
Layout* layout, Dirsearch* dirpath, Mapfile* mapfile,
|
||||||
Mapfile* mapfile, const Input_argument* input_argument,
|
const Input_argument* input_argument,
|
||||||
Input_group* input_group, Task_token* this_blocker,
|
Input_group* input_group, Task_token* this_blocker,
|
||||||
Task_token* next_blocker)
|
Task_token* next_blocker)
|
||||||
: options_(options), input_objects_(input_objects), symtab_(symtab),
|
: input_objects_(input_objects), symtab_(symtab), layout_(layout),
|
||||||
layout_(layout), dirpath_(dirpath), mapfile_(mapfile),
|
dirpath_(dirpath), mapfile_(mapfile), input_argument_(input_argument),
|
||||||
input_argument_(input_argument), input_group_(input_group),
|
input_group_(input_group), this_blocker_(this_blocker),
|
||||||
this_blocker_(this_blocker), next_blocker_(next_blocker)
|
next_blocker_(next_blocker)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
~Read_symbols();
|
~Read_symbols();
|
||||||
@ -90,7 +90,6 @@ class Read_symbols : public Task
|
|||||||
bool
|
bool
|
||||||
do_read_symbols(Workqueue*);
|
do_read_symbols(Workqueue*);
|
||||||
|
|
||||||
const General_options& options_;
|
|
||||||
Input_objects* input_objects_;
|
Input_objects* input_objects_;
|
||||||
Symbol_table* symtab_;
|
Symbol_table* symtab_;
|
||||||
Layout* layout_;
|
Layout* layout_;
|
||||||
@ -230,13 +229,12 @@ class Finish_group : public Task
|
|||||||
class Read_script : public Task
|
class Read_script : public Task
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Read_script(const General_options& options, Symbol_table* symtab,
|
Read_script(Symbol_table* symtab, Layout* layout, Dirsearch* dirpath,
|
||||||
Layout* layout, Dirsearch* dirpath, Input_objects* input_objects,
|
Input_objects* input_objects, Mapfile* mapfile,
|
||||||
Mapfile* mapfile, Input_group* input_group,
|
Input_group* input_group, const Input_argument* input_argument,
|
||||||
const Input_argument* input_argument,
|
|
||||||
Input_file* input_file, Task_token* this_blocker,
|
Input_file* input_file, Task_token* this_blocker,
|
||||||
Task_token* next_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_objects_(input_objects), mapfile_(mapfile),
|
||||||
input_group_(input_group), input_argument_(input_argument),
|
input_group_(input_group), input_argument_(input_argument),
|
||||||
input_file_(input_file), this_blocker_(this_blocker),
|
input_file_(input_file), this_blocker_(this_blocker),
|
||||||
@ -260,7 +258,6 @@ class Read_script : public Task
|
|||||||
get_name() const;
|
get_name() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const General_options& options_;
|
|
||||||
Symbol_table* symtab_;
|
Symbol_table* symtab_;
|
||||||
Layout* layout_;
|
Layout* layout_;
|
||||||
Dirsearch* dirpath_;
|
Dirsearch* dirpath_;
|
||||||
|
@ -1321,8 +1321,7 @@ class Parser_closure
|
|||||||
// as a script. Return true if the file was handled.
|
// as a script. Return true if the file was handled.
|
||||||
|
|
||||||
bool
|
bool
|
||||||
read_input_script(Workqueue* workqueue, const General_options& options,
|
read_input_script(Workqueue* workqueue, Symbol_table* symtab, Layout* layout,
|
||||||
Symbol_table* symtab, Layout* layout,
|
|
||||||
Dirsearch* dirsearch, Input_objects* input_objects,
|
Dirsearch* dirsearch, Input_objects* input_objects,
|
||||||
Mapfile* mapfile, Input_group* input_group,
|
Mapfile* mapfile, Input_group* input_group,
|
||||||
const Input_argument* input_argument,
|
const Input_argument* input_argument,
|
||||||
@ -1363,7 +1362,7 @@ read_input_script(Workqueue* workqueue, const General_options& options,
|
|||||||
nb = new Task_token(true);
|
nb = new Task_token(true);
|
||||||
nb->add_blocker();
|
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,
|
layout, dirsearch, mapfile, &*p,
|
||||||
input_group, this_blocker, nb));
|
input_group, this_blocker, nb));
|
||||||
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);
|
posdep.set_format_enum(General_options::OBJECT_FORMAT_ELF);
|
||||||
Input_file_argument input_argument(filename, false, "", false, posdep);
|
Input_file_argument input_argument(filename, false, "", false, posdep);
|
||||||
Input_file input_file(&input_argument);
|
Input_file input_file(&input_argument);
|
||||||
if (!input_file.open(cmdline->options(), dirsearch, task))
|
if (!input_file.open(dirsearch, task))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
std::string input_string;
|
std::string input_string;
|
||||||
|
@ -389,8 +389,8 @@ class Script_options
|
|||||||
// whether the function took over NEXT_BLOCKER.
|
// whether the function took over NEXT_BLOCKER.
|
||||||
|
|
||||||
bool
|
bool
|
||||||
read_input_script(Workqueue*, const General_options&, Symbol_table*, Layout*,
|
read_input_script(Workqueue*, Symbol_table*, Layout*, Dirsearch*,
|
||||||
Dirsearch*, Input_objects*, Mapfile*, Input_group*,
|
Input_objects*, Mapfile*, Input_group*,
|
||||||
const Input_argument*, Input_file*,
|
const Input_argument*, Input_file*,
|
||||||
Task_token* next_blocker, bool* used_next_blocker);
|
Task_token* next_blocker, bool* used_next_blocker);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user