From 4277535cdc6ce6998cdc273bbe454f9ca2c23037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= Date: Fri, 17 Apr 2015 11:51:36 -0400 Subject: 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. --- gold/symtab.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gold/symtab.cc') diff --git a/gold/symtab.cc b/gold/symtab.cc index 8ec8f73df7..d4f40c8d54 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -649,7 +649,7 @@ Symbol_table::gc_mark_symbol(Symbol* sym) if (is_ordinary && shndx != elfcpp::SHN_UNDEF) { gold_assert(this->gc_!= NULL); - this->gc_->worklist().push(Section_id(sym->object(), shndx)); + this->gc_->worklist().push_back(Section_id(sym->object(), shndx)); } parameters->target().gc_mark_symbol(this, sym); } -- cgit v1.2.3