This::addr16_hi(view, value + 0x8000, addend);
}
- // R_PPC_REL16: (Symbol + Addend - Address) & 0xffff
+ // R_POWERPC_REL16: (Symbol + Addend - Address) & 0xffff
static inline void
rel16(unsigned char* view,
typename elfcpp::Elf_types<size>::Elf_Addr value,
typename elfcpp::Elf_types<size>::Elf_Addr address)
{ This_reloc::pcrela16(view, value, addend, address); }
- // R_PPC_REL16_LO: (Symbol + Addend - Address) & 0xffff
+ // R_POWERPC_REL16_LO: (Symbol + Addend - Address) & 0xffff
static inline void
rel16_lo(unsigned char* view,
typename elfcpp::Elf_types<size>::Elf_Addr value,
typename elfcpp::Elf_types<size>::Elf_Addr address)
{ This_reloc::pcrela16(view, value, addend, address); }
- // R_PPC_REL16_HI: ((Symbol + Addend - Address) >> 16) & 0xffff
+ // R_POWERPC_REL16_HI: ((Symbol + Addend - Address) >> 16) & 0xffff
static inline void
rel16_hi(unsigned char* view,
typename elfcpp::Elf_types<size>::Elf_Addr value,
This::template rela<16>(view, 16, 0xffff, value - address, addend);
}
- // R_PPC_REL16_HA: Same as R_PPC_REL16_HI except that if the
+ // R_POWERPC_REL16_HA: Same as R_POWERPC_REL16_HI except that if the
// final value of the low 16 bits of the
// relocation is negative, add one.
static inline void
void
do_write(Output_file* of)
{
- replace_constant(this->header_index_,
- (size == 32
- ? this->layout_->dynamic_section()->address()
- : this->address() + 0x8000));
+ this->replace_constant(this->header_index_,
+ (size == 32
+ ? this->layout_->dynamic_section()->address()
+ : this->address() + 0x8000));
Output_data_got<size, big_endian>::do_write(of);
}
os->set_entsize(0);
}
+ // Write to a map file.
+ void
+ do_print_to_mapfile(Mapfile* mapfile) const
+ { mapfile->print_output_data(this, _("** PLT")); }
+
private:
// The size of an entry in the PLT.
static const int plt_entry_size = size == 32 ? 4 : 24;
return this->pltresolve_;
}
+ protected:
+ // Write to a map file.
+ void
+ do_print_to_mapfile(Mapfile* mapfile) const
+ { mapfile->print_output_data(this, _("** glink")); }
+
private:
static const int pltresolve_size = 16*4;
case elfcpp::R_POWERPC_REL24:
case elfcpp::R_PPC_LOCAL24PC:
- case elfcpp::R_PPC_REL16:
- case elfcpp::R_PPC_REL16_LO:
- case elfcpp::R_PPC_REL16_HI:
- case elfcpp::R_PPC_REL16_HA:
+ case elfcpp::R_POWERPC_REL16:
+ case elfcpp::R_POWERPC_REL16_LO:
+ case elfcpp::R_POWERPC_REL16_HI:
+ case elfcpp::R_POWERPC_REL16_HA:
return Symbol::RELATIVE_REF;
case elfcpp::R_PPC_PLTREL24:
case elfcpp::R_POWERPC_NONE:
case elfcpp::R_POWERPC_GNU_VTINHERIT:
case elfcpp::R_POWERPC_GNU_VTENTRY:
+ case elfcpp::R_PPC64_TOCSAVE:
break;
case elfcpp::R_PPC64_ADDR64:
case elfcpp::R_POWERPC_REL24:
case elfcpp::R_PPC_LOCAL24PC:
case elfcpp::R_POWERPC_REL32:
- case elfcpp::R_PPC_REL16_LO:
- case elfcpp::R_PPC_REL16_HA:
+ case elfcpp::R_POWERPC_REL16_LO:
+ case elfcpp::R_POWERPC_REL16_HA:
break;
case elfcpp::R_POWERPC_GOT16:
}
break;
- case elfcpp::R_PPC_REL16:
- case elfcpp::R_PPC_REL16_LO:
- case elfcpp::R_PPC_REL16_HI:
- case elfcpp::R_PPC_REL16_HA:
+ case elfcpp::R_POWERPC_REL16:
+ case elfcpp::R_POWERPC_REL16_LO:
+ case elfcpp::R_POWERPC_REL16_HI:
+ case elfcpp::R_POWERPC_REL16_HA:
break;
case elfcpp::R_POWERPC_GOT16:
Reloc::addr16_ha(view, value, 0);
break;
- case elfcpp::R_PPC_REL16_LO:
+ case elfcpp::R_POWERPC_REL16_LO:
Reloc::rel16_lo(view, value, 0, address);
break;
- case elfcpp::R_PPC_REL16_HI:
+ case elfcpp::R_POWERPC_REL16_HI:
Reloc::rel16_hi(view, value, 0, address);
break;
- case elfcpp::R_PPC_REL16_HA:
+ case elfcpp::R_POWERPC_REL16_HA:
Reloc::rel16_ha(view, value, 0, address);
break;
r_type);
break;
+ case elfcpp::R_PPC64_TOCSAVE:
+ // For the time being this can be ignored.
+ break;
+
default:
gold_error_at_location(relinfo, relnum, rela.get_r_offset(),
_("unsupported reloc %u"),