diff options
author | Doug Kwan <dougkwan@google.com> | 2010-02-24 20:50:59 +0000 |
---|---|---|
committer | Doug Kwan <dougkwan@google.com> | 2010-02-24 20:50:59 +0000 |
commit | 101654612f383f5427e2d727556eda80537de76b (patch) | |
tree | b57e25c9d904f79e0cd79d05af1fdc32f1be34b9 /gold/fileread.cc | |
parent | 24291992dac3f63bef7ee031d4d5f2f96920e070 (diff) | |
download | gdb-101654612f383f5427e2d727556eda80537de76b.zip gdb-101654612f383f5427e2d727556eda80537de76b.tar.gz gdb-101654612f383f5427e2d727556eda80537de76b.tar.bz2 |
2010-02-24 Doug Kwan <dougkwan@google.com>
* arm.cc (Target_arm::do_finalize_sections): Skip processor specific
flags and attributes merging if an input file is a binary file.
* fileread.cc (Input_file::open): Record format of original file.
* fileread.h (Input_file::Format): New enum type.
(Input_file::Input_file): Initialize data member format_.
(Input_file::format): New method definition.
(Input_file::format_):: New data member.
Diffstat (limited to 'gold/fileread.cc')
-rw-r--r-- | gold/fileread.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gold/fileread.cc b/gold/fileread.cc index 4e8157f..9f19099 100644 --- a/gold/fileread.cc +++ b/gold/fileread.cc @@ -938,17 +938,22 @@ Input_file::open(const Dirsearch& dirpath, const Task* task, int *pindex) this->input_argument_->options().format_enum(); bool ok; if (format == General_options::OBJECT_FORMAT_ELF) - ok = this->file_.open(task, name); + { + ok = this->file_.open(task, name); + this->format_ = FORMAT_ELF; + } else { gold_assert(format == General_options::OBJECT_FORMAT_BINARY); ok = this->open_binary(task, name); + this->format_ = FORMAT_BINARY; } if (!ok) { gold_error(_("cannot open %s: %s"), name.c_str(), strerror(errno)); + this->format_ = FORMAT_NONE; return false; } |