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/object.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gold/object.cc') diff --git a/gold/object.cc b/gold/object.cc index f28305b..18c6670 100644 --- a/gold/object.cc +++ b/gold/object.cc @@ -1602,7 +1602,7 @@ Sized_relobj_file::do_layout(Symbol_table* symtab, || shdr.get_sh_type() == elfcpp::SHT_INIT_ARRAY || shdr.get_sh_type() == elfcpp::SHT_FINI_ARRAY) { - symtab->gc()->worklist().push(Section_id(this, i)); + symtab->gc()->worklist().push_back(Section_id(this, i)); } // If the section name XXX can be represented as a C identifier // it cannot be discarded if there are references to -- cgit v1.1