aboutsummaryrefslogtreecommitdiff
path: root/gold/object.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/object.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/object.cc')
-rw-r--r--gold/object.cc2
1 files changed, 1 insertions, 1 deletions
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<size, big_endian>::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