Remove powerpc.cc copy of use_plt_offset
authorAlan Modra <amodra@gmail.com>
Fri, 1 Nov 2013 05:39:56 +0000 (16:09 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 4 Nov 2013 05:30:13 +0000 (16:00 +1030)
commit88b8e63904fda25c029deaf25d7b4e489b351470
tree5a2a5dbe1fed7c88ce042b6e9f1df2208f9f7fc8
parent25153ba0870289c6b5f26e9552c5501a33571570
Remove powerpc.cc copy of use_plt_offset

This adds an extra flag for needs_dynamic_reloc() in order to remove
the copy of this function and use_plt_offset() in powerpc.cc, and
tweaks the powerpc get_reference_flags() to return the flag as
appropriate.  ELFv2 does not want ELFv1 behaviour here.

* symtab.h (Symbol::Reference_flags): Add FUNC_DESC_ABI.
(Symbol::needs_dynamic_reloc): Test new flag.
* powerpc.cc (needs_dynamic_reloc, use_plt_offset): Delete.
(Target_powerpc::Scan::get_reference_flags): Add target param.
Return FUNC_DESC_ABI for 64-bit ELFv1.
(Target_powerpc::Branch_info::make_stub): Adjust get_reference_flags
call.
(Target_powerpc::Scan::global): Use Symbol::needs_dynamic_reloc.
(Target_powerpc::Relocate::relocate): Use Symbol::use_plt_offset.
gold/powerpc.cc
gold/symtab.h