This patch adds support for more relocations in relocatable link. It also introduces get_lo16_rel_addend method for finding partnering LO16 relocation because there is a problem with current implementation when using --threads option. Regards, Vladimir ChangeLog - PR gold/21152 * target.h (Sized_target::relocate_special_relocatable): Add reloc_count parameter. * arm.cc (Target_arm::relocate_special_relocatable): Likewise. * target-reloc.h (relocate_relocs): Pass reloc_count to relocate_special_relocatable. * mips.cc (Mips_scan_relocatable_relocs::local_section_strategy): Return RELOC_SPECIAL for more relocations. (Symbol_visitor_check_symbols::operator()): Check for is_output_pic rather then checking output_is_position_independent option. (Target_mips::is_output_pic): New method. (Mips_relocate_functions::get_lo16_rel_addend): Likewise. (Target_mips::set_gp): Add case for relocatable link. (Target_mips::relocate_special_relocatable): Add reloc_count parameter. Add support for RELA type of relocation sections. Add support for more relocations. Remove unused code.