summaryrefslogtreecommitdiff
path: root/gold/readsyms.cc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2009-02-13 19:04:45 +0000
committerCary Coutant <ccoutant@google.com>2009-02-13 19:04:45 +0000
commitf488e4b0e99b9f8871013aa719ea4ff477a4f330 (patch)
tree638692a3604b5b1c5fa5f4a4148a4876858a32a3 /gold/readsyms.cc
parent7065b901d547c516370affe96e0162bb82926cc7 (diff)
(From Rafael Espindola)
* archive.cc (Archive::include_member): Update calls to add_symbols. * dynobj.cc (Sized_dynobj<size, big_endian>::make_version_map): Add the Layout argument. * dynobj.h (do_add_symbols): Add the Layout argument. * object.cc (Sized_relobj<size, big_endian>::do_add_symbols): Add the Layout argument. * object.h (Object::add_symbols): Add the Layout argument. (Object::do_add_symbols): Add the Layout argument. (Sized_relobj::do_add_symbols): Add the Layout argument. * plugin.cc (Sized_pluginobj<size, big_endian>::do_add_symbols): Unify the two versions. (Add_plugin_symbols): Remove. * plugin.h (Pluginobj::add_symbols, Pluginobj::do_add_symbols): Remove. (Sized_pluginobj::do_add_symbols): Unify the two versions. (Add_plugin_symbols): Remove. * readsyms.cc (Read_symbols::do_read_symbols): Update call to Add_symbols. Use Add_symbols instead of Add_plugin_symbols. (Add_symbols::run): Make it work with Pulginobj.
Diffstat (limited to 'gold/readsyms.cc')
-rw-r--r--gold/readsyms.cc20
1 files changed, 14 insertions, 6 deletions
diff --git a/gold/readsyms.cc b/gold/readsyms.cc
index 412ffcd077..8954837624 100644
--- a/gold/readsyms.cc
+++ b/gold/readsyms.cc
@@ -200,11 +200,12 @@ Read_symbols::do_read_symbols(Workqueue* workqueue)
// We are done with the file at this point, so unlock it.
obj->unlock(this);
- workqueue->queue_next(new Add_plugin_symbols(this->symtab_,
- this->layout_,
- obj,
- this->this_blocker_,
- this->next_blocker_));
+ workqueue->queue_next(new Add_symbols(this->input_objects_,
+ this->symtab_,
+ this->layout_,
+ obj, NULL,
+ this->this_blocker_,
+ this->next_blocker_));
return true;
}
}
@@ -379,6 +380,13 @@ Add_symbols::locks(Task_locker* tl)
void
Add_symbols::run(Workqueue*)
{
+ Pluginobj* pluginobj = this->object_->pluginobj();
+ if (pluginobj != NULL)
+ {
+ this->object_->add_symbols(this->symtab_, this->sd_, this->layout_);
+ return;
+ }
+
if (!this->input_objects_->add_object(this->object_))
{
// FIXME: We need to close the descriptor here.
@@ -387,7 +395,7 @@ Add_symbols::run(Workqueue*)
else
{
this->object_->layout(this->symtab_, this->layout_, this->sd_);
- this->object_->add_symbols(this->symtab_, this->sd_);
+ this->object_->add_symbols(this->symtab_, this->sd_, this->layout_);
this->object_->release();
}
delete this->sd_;