diff options
author | Alan Modra <amodra@gmail.com> | 2012-09-09 03:43:51 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2012-09-09 03:43:51 +0000 |
commit | e81fea4d172699b2e986bc541f812cac0995da6b (patch) | |
tree | f53406e2ad174c23989c3052f9f6367ff7967099 /gold/gold.cc | |
parent | b7099d964f9a5736272cadb6d19083d643005aa1 (diff) | |
download | gdb-e81fea4d172699b2e986bc541f812cac0995da6b.zip gdb-e81fea4d172699b2e986bc541f812cac0995da6b.tar.gz gdb-e81fea4d172699b2e986bc541f812cac0995da6b.tar.bz2 |
* target.h (Target::gc_mark_symbol, do_gc_mark_symbol): New functions.
(Sized_target::gc_add_reference, do_gc_add_reference): New functions.
* gc.h (gc_process_relocs): Call target gc_add_reference.
* gold.cc (queue_middle_tasks): Use gc_mark_symbol on start sym.
* symtab.cc (Symbol_table::gc_mark_undef_symbols): Use gc_mark_symbol.
(Symbol_table::gc_mark_symbol): Call target gc_mark_symbol. Remove
unnecessary cast.
* powerpc.cc (Powerpc_relobj::get_opd_ent): Rearrange parameters
to cater for when we don't need code offset. Update use.
(Powerpc_relobj::access_from_map_, opd_valid_): New vars.
(Powerpc_relobj::access_from_map, add_reference, opd_valid,
set_opd_valid): New functions.
(Target_powerpc::do_gc_add_reference): New function.
(Target_powerpc::gc_process_relocs): Call gc()->add_reference on
stashed refs.
(Target_powerpc::do_gc_mark_symbol): New function.
Diffstat (limited to 'gold/gold.cc')
-rw-r--r-- | gold/gold.cc | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/gold/gold.cc b/gold/gold.cc index 1b4badc..0f9a228 100644 --- a/gold/gold.cc +++ b/gold/gold.cc @@ -504,15 +504,7 @@ queue_middle_tasks(const General_options& options, // Find the start symbol if any. Symbol* start_sym = symtab->lookup(parameters->entry()); if (start_sym != NULL) - { - bool is_ordinary; - unsigned int shndx = start_sym->shndx(&is_ordinary); - if (is_ordinary) - { - symtab->gc()->worklist().push( - Section_id(start_sym->object(), shndx)); - } - } + symtab->gc_mark_symbol(start_sym); // Symbols named with -u should not be considered garbage. symtab->gc_mark_undef_symbols(layout); gold_assert(symtab->gc() != NULL); |