From c335b55d34437e607fca5ba7f0bea4a9696d2fe5 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sat, 28 Jan 2012 00:23:31 +0000 Subject: [PATCH] Correct incremental relocation offset 2012-01-27 H.J. Lu * incremental.cc (write_info_blocks): Correct relocation offset. --- gold/ChangeLog | 4 ++++ gold/incremental.cc | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index beb6d342244..4ef4cadb771 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,7 @@ +2012-01-27 H.J. Lu + + * incremental.cc (write_info_blocks): Correct relocation offset. + 2012-01-27 H.J. Lu * x86_64.cc (Relocate::tls_gd_to_ie): Support x32. diff --git a/gold/incremental.cc b/gold/incremental.cc index 39bad37b5e6..2a265736a79 100644 --- a/gold/incremental.cc +++ b/gold/incremental.cc @@ -1632,7 +1632,8 @@ Output_section_incremental_inputs::write_info_blocks( Swap32::writeval(pov + 4, shndx); Swap32::writeval(pov + 8, chain); Swap32::writeval(pov + 12, nrelocs); - Swap32::writeval(pov + 16, first_reloc * 3 * sizeof_addr); + Swap32::writeval(pov + 16, + first_reloc * (8 + 2 * sizeof_addr)); pov += 20; } -- 2.30.2