From efc6fa128f00d61014f56530724767ea048bf594 Mon Sep 17 00:00:00 2001 From: Cary Coutant Date: Sat, 2 May 2015 08:40:09 -0700 Subject: Change Section_id type to use Relobj* instead of Object*. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2015-04-29 Cary Coutant Rafael Ávila de Espíndola gold/ * gc.h (Garbage_collection::is_section_garbage): Change Object* to Relobj*. (Garbage_collection::add_reference): Likewise. (Garbage_collection::gc_process_relocs): Likewise. Don't push object/shndx pair onto *secvec for dynamic objects. Don't follow relocations pointing to dynamic objects for GC. * icf.cc (Icf::find_identical_sections): Change Object* to Relobj*. (Icf::unfold_section): Likewise. (Icf::is_section_folded): Likewise. (Icf::get_folded_section): Likewise. * icf.h: (Icf::get_folded_section): Likewise. (Icf::unfold_section): Likewise. (Icf::is_section_folded): Likewise. (Icf::section_has_function_pointers): Likewise. (Icf::set_section_has_function_pointers): Likewise. * object.h (Section_id): Likewise. (Const_section_id): Likewise. * output.cc (Output_section::update_section_layout): Likewise. * output.h: (Output_section_lookup_maps::find_relaxed_input_section): Likewise. * plugin.cc (update_section_order): Likewise. (unique_segment_for_sections): Likewise. * powerpc.cc (Powerpc_relobj::add_reference): Likewise. (Target_powerpc::do_gc_add_reference): Likewise. (Target_powerpc::gc_process_relocs): Likewise. (Target_powerpc::do_gc_add_reference): Likewise. * symtab.cc (Symbol_table::is_section_folded): Likewise. (Symbol_table::gc_mark_symbol): Likewise. * symtab.h: (Symbol_table::is_section_folded): Likewise. * target.h: (Sized_target::gc_add_reference): Likewise. (Sized_target::do_gc_add_reference): Likewise. --- gold/icf.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gold/icf.cc') diff --git a/gold/icf.cc b/gold/icf.cc index 8de6386..96b7f2d 100644 --- a/gold/icf.cc +++ b/gold/icf.cc @@ -787,7 +787,7 @@ Icf::find_identical_sections(const Input_objects* input_objects, else if (sym->source() == Symbol::FROM_OBJECT && !sym->object()->is_dynamic()) { - Object* obj = sym->object(); + Relobj* obj = static_cast(sym->object()); bool is_ordinary; unsigned int shndx = sym->shndx(&is_ordinary); if (is_ordinary) @@ -804,7 +804,7 @@ Icf::find_identical_sections(const Input_objects* input_objects, // Unfolds the section denoted by OBJ and SHNDX if folded. void -Icf::unfold_section(Object* obj, unsigned int shndx) +Icf::unfold_section(Relobj* obj, unsigned int shndx) { Section_id secn(obj, shndx); Uniq_secn_id_map::iterator it = this->section_id_.find(secn); @@ -821,7 +821,7 @@ Icf::unfold_section(Object* obj, unsigned int shndx) // is different from this section. bool -Icf::is_section_folded(Object* obj, unsigned int shndx) +Icf::is_section_folded(Relobj* obj, unsigned int shndx) { Section_id secn(obj, shndx); Uniq_secn_id_map::iterator it = this->section_id_.find(secn); @@ -835,7 +835,7 @@ Icf::is_section_folded(Object* obj, unsigned int shndx) // This function returns the folded section for the given section. Section_id -Icf::get_folded_section(Object* dup_obj, unsigned int dup_shndx) +Icf::get_folded_section(Relobj* dup_obj, unsigned int dup_shndx) { Section_id dup_secn(dup_obj, dup_shndx); Uniq_secn_id_map::iterator it = this->section_id_.find(dup_secn); -- cgit v1.1