From 13cf9988bc2852ba66d6096578a518c94bfccdcd Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 17 Apr 2012 01:50:39 +0000 Subject: gold: Allow use_plt_offset to be specified for global relocations. gold/ * output.h (Output_reloc): Allow use_plt_offset for global relocs too. (class Output_data_reloc): Adjust calls to Output_reloc_type. (Output_data_reloc::add_global_relative): (RELA only) Add use_plt_offset. * output.cc (Output_reloc::Output_reloc): Add use_plt_offset flag for global relocs too. (Output_reloc::symbol_value): Respect use_plt_offset_ for global symbols. * powerpc.cc (Target_powerpc::Scan::global): Adjust add_global_relative calls. * sparc.cc (Target_sparc::Scan::global): Likewise. * x86_64.cc (Target_x86_64::Scan::global): Likewise. --- gold/x86_64.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gold/x86_64.cc') diff --git a/gold/x86_64.cc b/gold/x86_64.cc index 3962e1e..d67924b 100644 --- a/gold/x86_64.cc +++ b/gold/x86_64.cc @@ -1667,24 +1667,24 @@ Target_x86_64::reserve_global_got_entry(unsigned int got_index, this->got_, got_offset, 0); else rela_dyn->add_global_relative(gsym, elfcpp::R_X86_64_RELATIVE, - this->got_, got_offset, 0); + this->got_, got_offset, 0, false); } break; case GOT_TYPE_TLS_OFFSET: rela_dyn->add_global_relative(gsym, elfcpp::R_X86_64_TPOFF64, - this->got_, got_offset, 0); + this->got_, got_offset, 0, false); break; case GOT_TYPE_TLS_PAIR: this->got_->reserve_slot(got_index + 1); rela_dyn->add_global_relative(gsym, elfcpp::R_X86_64_DTPMOD64, - this->got_, got_offset, 0); + this->got_, got_offset, 0, false); rela_dyn->add_global_relative(gsym, elfcpp::R_X86_64_DTPOFF64, - this->got_, got_offset + 8, 0); + this->got_, got_offset + 8, 0, false); break; case GOT_TYPE_TLS_DESC: this->got_->reserve_slot(got_index + 1); rela_dyn->add_global_relative(gsym, elfcpp::R_X86_64_TLSDESC, - this->got_, got_offset, 0); + this->got_, got_offset, 0, false); break; default: gold_unreachable(); @@ -2505,7 +2505,7 @@ Target_x86_64::Scan::global(Symbol_table* symtab, output_section, object, data_shndx, reloc.get_r_offset(), - reloc.get_r_addend()); + reloc.get_r_addend(), false); } else { @@ -2612,7 +2612,7 @@ Target_x86_64::Scan::global(Symbol_table* symtab, unsigned int got_off = gsym->got_offset(GOT_TYPE_STANDARD); rela_dyn->add_global_relative(gsym, elfcpp::R_X86_64_RELATIVE, - got, got_off, 0); + got, got_off, 0, false); } } } -- cgit v1.1