+2015-10-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gold/19184
+ * incremental.cc (Got_plt_view_info): Add got_entry_size.
+ (Local_got_offset_visitor::visit): Replace got_entry_size_
+ with info_.got_entry_size.
+ (Local_got_offset_visitor::got_entry_size_): Removed.
+ (Global_got_offset_visitor::visit): Replace got_entry_size_
+ with info_.got_entry_size.
+ (Global_got_offset_visitor::got_entry_size_): Removed.
+ (Output_section_incremental_inputs::write_got_plt): Initialize
+ view_info.got_entry_size.
+ * target.h (Sized_target::got_entry_size): New virtual function.
+ * x86_64.cc (Target_x86_64::got_entry_size): New function.
+
2015-10-28 Marcin KoĆcielnicki <koriakin@0x04.net>
* testsuite/binary_test.cc: Add __attribute__((aligned(1))).
unsigned int first_plt_entry_offset;
// Size of a PLT entry (this is a target-dependent value).
unsigned int plt_entry_size;
+ // Size of a GOT entry (this is a target-dependent value).
+ unsigned int got_entry_size;
// Symbol index to write in the GOT descriptor array. For global symbols,
// this is the global symbol table index; for local symbols, it is the
// local symbol table index.
void
visit(unsigned int got_type, unsigned int got_offset)
{
- unsigned int got_index = got_offset / this->got_entry_size_;
+ unsigned int got_index = got_offset / this->info_.got_entry_size;
gold_assert(got_index < this->info_.got_count);
// We can only handle GOT entry types in the range 0..0x7e
// because we use a byte array to store them, and we use the
}
private:
- static const unsigned int got_entry_size_ = size / 8;
struct Got_plt_view_info& info_;
};
void
visit(unsigned int got_type, unsigned int got_offset)
{
- unsigned int got_index = got_offset / this->got_entry_size_;
+ unsigned int got_index = got_offset / this->info_.got_entry_size;
gold_assert(got_index < this->info_.got_count);
// We can only handle GOT entry types in the range 0..0x7e
// because we use a byte array to store them, and we use the
}
private:
- static const unsigned int got_entry_size_ = size / 8;
struct Got_plt_view_info& info_;
};
view_info.plt_count = target->plt_entry_count();
view_info.first_plt_entry_offset = target->first_plt_entry_offset();
view_info.plt_entry_size = target->plt_entry_size();
+ view_info.got_entry_size = target->got_entry_size();
view_info.got_type_p = pov + 8;
view_info.got_desc_p = (view_info.got_type_p
+ ((view_info.got_count + 3) & ~3));