* object.h (Sized_relobj_file::adjust_local_symbol,

do_adjust_local_symbol): New functions.
	* object.cc (Sized_relobj_file::do_count_local_symbols): Use the above.
	* powerpc.cc (Powerpc_relobj::do_adjust_local_symbol): New function.
	(Powerpc_relobj::scan_opd_relocs): Warn on unexpected opd relocs
	and irregular opd entry spacing.
	(Powerpc_relobj::do_read_relocs): Add opd size checks.
	(Global_symbol_visitor_opd): New functor.
	(Target_powerpc::do_finalize_sections): Omit global symbols defined
	on deleted opd entries.
This commit is contained in:
Alan Modra
2012-09-25 00:59:25 +00:00
parent a1e5fd6938
commit ec4dbad32d
4 changed files with 122 additions and 5 deletions

View File

@@ -2110,7 +2110,8 @@ Sized_relobj_file<size, big_endian>::do_count_local_symbols(Stringpool* pool,
continue;
}
if (sym.get_st_type() == elfcpp::STT_SECTION)
if (sym.get_st_type() == elfcpp::STT_SECTION
|| !this->adjust_local_symbol(&lv))
{
lv.set_no_output_symtab_entry();
gold_assert(!lv.needs_output_dynsym_entry());