diff options
author | Ian Lance Taylor <iant@google.com> | 2007-11-07 00:31:32 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-11-07 00:31:32 +0000 |
commit | 019cdb1a59d66739843fdb0e6221566bcf7d60bd (patch) | |
tree | e11f61bfc508817a13f8ce7ed438795b33225476 /gold/object.cc | |
parent | 53c8095f6074f3a8338e73f81ec45fc077fa0195 (diff) | |
download | gdb-019cdb1a59d66739843fdb0e6221566bcf7d60bd.zip gdb-019cdb1a59d66739843fdb0e6221566bcf7d60bd.tar.gz gdb-019cdb1a59d66739843fdb0e6221566bcf7d60bd.tar.bz2 |
From Craig Silverstein: Don't crash if we see a file we don't recognize.
Diffstat (limited to 'gold/object.cc')
-rw-r--r-- | gold/object.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gold/object.cc b/gold/object.cc index 58f0db0..8efd4ec 100644 --- a/gold/object.cc +++ b/gold/object.cc @@ -866,6 +866,15 @@ Sized_relobj<size, big_endian>::get_symbol_location_info( bool Input_objects::add_object(Object* obj) { + Target* target = obj->target(); + if (this->target_ == NULL) + this->target_ = target; + else if (this->target_ != target) + { + gold_error(_("%s: incompatible target"), obj->name().c_str()); + return false; + } + if (!obj->is_dynamic()) this->relobj_list_.push_back(static_cast<Relobj*>(obj)); else @@ -884,15 +893,6 @@ Input_objects::add_object(Object* obj) this->dynobj_list_.push_back(dynobj); } - Target* target = obj->target(); - if (this->target_ == NULL) - this->target_ = target; - else if (this->target_ != target) - { - gold_error(_("%s: incompatible target"), obj->name().c_str()); - return false; - } - set_parameters_size_and_endianness(target->get_size(), target->is_big_endian()); |