View | Details | Raw Unified | Return to bug 18695
Collapse All | Expand All

(-)a/gold/x86_64.cc (-2 / +11 lines)
Lines 3385-3392 class X86_64_relocate_functions : public Relocate_functions<size, false> Link Here
3385
  {
3385
  {
3386
    typedef typename elfcpp::Swap<32, false>::Valtype Valtype;
3386
    typedef typename elfcpp::Swap<32, false>::Valtype Valtype;
3387
    Valtype* wv = reinterpret_cast<Valtype*>(view);
3387
    Valtype* wv = reinterpret_cast<Valtype*>(view);
3388
    typename elfcpp::Elf_types<64>::Elf_Addr value =
3388
    typename elfcpp::Elf_types<64>::Elf_Addr value;
3389
	psymval->value(object, addend) - address;
3389
    if (addend >= 0)
3390
      value = psymval->value(object, addend);
3391
    else
3392
      {
3393
	// For negative addends, get the symbol value without
3394
	// the addend, then add the addend using 64-bit arithmetic.
3395
	value = psymval->value(object, 0);
3396
	value += addend;
3397
      }
3398
    value -= address;
3390
    elfcpp::Swap<32, false>::writeval(wv, value);
3399
    elfcpp::Swap<32, false>::writeval(wv, value);
3391
    return (Bits<32>::has_overflow(value)
3400
    return (Bits<32>::has_overflow(value)
3392
	    ? Base::RELOC_OVERFLOW : Base::RELOC_OK);
3401
	    ? Base::RELOC_OVERFLOW : Base::RELOC_OK);

Return to bug 18695