Fix the calculation of AMD64_PCRQUAD relocations.
[deliverable/binutils-gdb.git] / bfd / coff-x86_64.c
index 398bc48b1987db6d207390fa4da59211a3429be3..d92e03dea1b5933c2ba61346df7d040a0635ae72 100644 (file)
@@ -614,7 +614,12 @@ coff_amd64_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
 #if defined(COFF_WITH_PE)
   if (howto->pc_relative)
     {
-      *addendp -= 4;
+#ifndef DONT_EXTEND_AMD64
+      if (rel->r_type == R_AMD64_PCRQUAD)
+       *addendp -= 8;
+      else
+#endif
+       *addendp -= 4;
 
       /* If the symbol is defined, then the generic code is going to
          add back the symbol value in order to cancel out an
This page took 0.023456 seconds and 4 git commands to generate.