aboutsummaryrefslogtreecommitdiff
path: root/gold/powerpc.cc
diff options
context:
space:
mode:
authorRafael Ávila de Espíndola <rafael.espindola@gmail.com>2015-04-17 11:51:36 -0400
committerRafael Ávila de Espíndola <rafael.espindola@gmail.com>2015-04-17 11:51:36 -0400
commit4277535cdc6ce6998cdc273bbe454f9ca2c23037 (patch)
treec5205ed53cb26c0b0b76a9e756b84ef48165d7a8 /gold/powerpc.cc
parenta4ea36c6cb13d100aacab3a90762597cef471b35 (diff)
downloadgdb-4277535cdc6ce6998cdc273bbe454f9ca2c23037.zip
gdb-4277535cdc6ce6998cdc273bbe454f9ca2c23037.tar.gz
gdb-4277535cdc6ce6998cdc273bbe454f9ca2c23037.tar.bz2
Use LIFO instead of FIFO to implement gc's transitive closure.
FIFO is harder to implement and has less locality than LIFO. It is also not necessary to implement a transitive closure, a LIFO works just as well.
Diffstat (limited to 'gold/powerpc.cc')
-rw-r--r--gold/powerpc.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 47bdc13..fddf3fa 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -238,7 +238,7 @@ public:
if (this->opd_ent_[i].gc_mark)
{
unsigned int shndx = this->opd_ent_[i].shndx;
- symtab->gc()->worklist().push(Section_id(this, shndx));
+ symtab->gc()->worklist().push_back(Section_id(this, shndx));
}
}
@@ -6434,7 +6434,8 @@ Target_powerpc<size, big_endian>::do_gc_mark_symbol(
if (ppc_object->opd_valid())
{
unsigned int dst_indx = ppc_object->get_opd_ent(dst_off);
- symtab->gc()->worklist().push(Section_id(ppc_object, dst_indx));
+ symtab->gc()->worklist().push_back(Section_id(ppc_object,
+ dst_indx));
}
else
ppc_object->add_gc_mark(dst_off);