// A reloc against a global symbol.
Output_reloc(Symbol* gsym, unsigned int type, Output_data* od,
- Address address, bool is_relative, bool is_symbolless);
+ Address address, bool is_relative, bool is_symbolless,
+ bool use_plt_offset);
Output_reloc(Symbol* gsym, unsigned int type,
Sized_relobj<size, big_endian>* relobj,
unsigned int shndx, Address address, bool is_relative,
- bool is_symbolless);
+ bool is_symbolless, bool use_plt_offset);
// A reloc against a local symbol or local section symbol.
bool is_symbolless_ : 1;
// True if the relocation is against a section symbol.
bool is_section_symbol_ : 1;
- // True if the addend should be the PLT offset. This is used only
- // for RELATIVE relocations to local symbols.
+ // True if the addend should be the PLT offset.
// (Used only for RELA, but stored here for space.)
bool use_plt_offset_ : 1;
// If the reloc address is an input section in an object, the
Output_reloc(Symbol* gsym, unsigned int type, Output_data* od,
Address address, Addend addend, bool is_relative,
- bool is_symbolless)
- : rel_(gsym, type, od, address, is_relative, is_symbolless),
+ bool is_symbolless, bool use_plt_offset)
+ : rel_(gsym, type, od, address, is_relative, is_symbolless,
+ use_plt_offset),
addend_(addend)
{ }
Output_reloc(Symbol* gsym, unsigned int type,
Sized_relobj<size, big_endian>* relobj,
unsigned int shndx, Address address, Addend addend,
- bool is_relative, bool is_symbolless)
+ bool is_relative, bool is_symbolless, bool use_plt_offset)
: rel_(gsym, type, relobj, shndx, address, is_relative,
- is_symbolless), addend_(addend)
+ is_symbolless, use_plt_offset), addend_(addend)
{ }
// A reloc against a local symbol.
void
add_global(Symbol* gsym, unsigned int type, Output_data* od, Address address)
- { this->add(od, Output_reloc_type(gsym, type, od, address, false, false)); }
+ { this->add(od, Output_reloc_type(gsym, type, od, address, false, false, false)); }
void
add_global(Symbol* gsym, unsigned int type, Output_data* od,
Sized_relobj<size, big_endian>* relobj,
unsigned int shndx, Address address)
{ this->add(od, Output_reloc_type(gsym, type, relobj, shndx, address,
- false, false)); }
+ false, false, false)); }
void
add_global_generic(Symbol* gsym, unsigned int type, Output_data* od,
gold_assert(addend == 0);
this->add(od, Output_reloc_type(gsym, type, od,
convert_types<Address, uint64_t>(address),
- false, false));
+ false, false, false));
}
void
static_cast<Sized_relobj<size, big_endian>*>(relobj);
this->add(od, Output_reloc_type(gsym, type, sized_relobj, shndx,
convert_types<Address, uint64_t>(address),
- false, false));
+ false, false, false));
}
// Add a RELATIVE reloc against a global symbol. The final relocation
void
add_global_relative(Symbol* gsym, unsigned int type, Output_data* od,
Address address)
- { this->add(od, Output_reloc_type(gsym, type, od, address, true, true)); }
+ { this->add(od, Output_reloc_type(gsym, type, od, address, true, true,
+ false)); }
void
add_global_relative(Symbol* gsym, unsigned int type, Output_data* od,
unsigned int shndx, Address address)
{
this->add(od, Output_reloc_type(gsym, type, relobj, shndx, address,
- true, true));
+ true, true, false));
}
// Add a global relocation which does not use a symbol for the relocation,
void
add_symbolless_global_addend(Symbol* gsym, unsigned int type,
Output_data* od, Address address)
- { this->add(od, Output_reloc_type(gsym, type, od, address, false, true)); }
+ { this->add(od, Output_reloc_type(gsym, type, od, address, false, true,
+ false)); }
void
add_symbolless_global_addend(Symbol* gsym, unsigned int type,
unsigned int shndx, Address address)
{
this->add(od, Output_reloc_type(gsym, type, relobj, shndx, address,
- false, true));
+ false, true, false));
}
// Add a reloc against a local symbol.
add_global(Symbol* gsym, unsigned int type, Output_data* od,
Address address, Addend addend)
{ this->add(od, Output_reloc_type(gsym, type, od, address, addend,
- false, false)); }
+ false, false, false)); }
void
add_global(Symbol* gsym, unsigned int type, Output_data* od,
unsigned int shndx, Address address,
Addend addend)
{ this->add(od, Output_reloc_type(gsym, type, relobj, shndx, address,
- addend, false, false)); }
+ addend, false, false, false)); }
void
add_global_generic(Symbol* gsym, unsigned int type, Output_data* od,
this->add(od, Output_reloc_type(gsym, type, od,
convert_types<Address, uint64_t>(address),
convert_types<Addend, uint64_t>(addend),
- false, false));
+ false, false, false));
}
void
this->add(od, Output_reloc_type(gsym, type, sized_relobj, shndx,
convert_types<Address, uint64_t>(address),
convert_types<Addend, uint64_t>(addend),
- false, false));
+ false, false, false));
}
// Add a RELATIVE reloc against a global symbol. The final output
void
add_global_relative(Symbol* gsym, unsigned int type, Output_data* od,
- Address address, Addend addend)
+ Address address, Addend addend, bool use_plt_offset)
{ this->add(od, Output_reloc_type(gsym, type, od, address, addend, true,
- true)); }
+ true, use_plt_offset)); }
void
add_global_relative(Symbol* gsym, unsigned int type, Output_data* od,
Sized_relobj<size, big_endian>* relobj,
- unsigned int shndx, Address address, Addend addend)
+ unsigned int shndx, Address address, Addend addend,
+ bool use_plt_offset)
{ this->add(od, Output_reloc_type(gsym, type, relobj, shndx, address,
- addend, true, true)); }
+ addend, true, true, use_plt_offset)); }
// Add a global relocation which does not use a symbol for the relocation,
// but which gets its addend from a symbol.
add_symbolless_global_addend(Symbol* gsym, unsigned int type, Output_data* od,
Address address, Addend addend)
{ this->add(od, Output_reloc_type(gsym, type, od, address, addend,
- false, true)); }
+ false, true, false)); }
void
add_symbolless_global_addend(Symbol* gsym, unsigned int type,
Sized_relobj<size, big_endian>* relobj,
unsigned int shndx, Address address, Addend addend)
{ this->add(od, Output_reloc_type(gsym, type, relobj, shndx, address,
- addend, false, true)); }
+ addend, false, true, false)); }
// Add a reloc against a local symbol.