Correct incremental relocation offset
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 28 Jan 2012 00:23:31 +0000 (00:23 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 28 Jan 2012 00:23:31 +0000 (00:23 +0000)
2012-01-27  H.J. Lu  <hongjiu.lu@intel.com>

* incremental.cc (write_info_blocks): Correct relocation offset.

gold/ChangeLog
gold/incremental.cc

index beb6d342244414b3fe921fb434482db8aab42fdd..4ef4cadb771a9864d7297eb0ff39b0e29fe0ce45 100644 (file)
@@ -1,3 +1,7 @@
+2012-01-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * incremental.cc (write_info_blocks): Correct relocation offset.
+
 2012-01-27  H.J. Lu  <hongjiu.lu@intel.com>
 
        * x86_64.cc (Relocate::tls_gd_to_ie): Support x32.
index 39bad37b5e64e5d7ea4ee7bed62198c0cf7eeb9e..2a265736a790ceb484a204b5a6ae58407c3ef4f3 100644 (file)
@@ -1632,7 +1632,8 @@ Output_section_incremental_inputs<size, big_endian>::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;
              }