2010-03-31 Kai Tietz <kai.tietz@onevision.com>
authorKai Tietz <kai.tietz@onevision.com>
Wed, 31 Mar 2010 16:32:02 +0000 (16:32 +0000)
committerKai Tietz <kai.tietz@onevision.com>
Wed, 31 Mar 2010 16:32:02 +0000 (16:32 +0000)
        * coff-i386.c (in_reloc_p): Check also for R_SECREL32.
        * coff-x86_64.c (in_reloc_p): Check also for R_AMD64_SECREL.

bfd/ChangeLog
bfd/coff-i386.c
bfd/coff-x86_64.c

index 172726c66acdbdaf804ffa5ac307a24f8f3849d4..723b6654e6825760a88467fd03fd60a2d26229fb 100644 (file)
@@ -1,3 +1,8 @@
+2010-03-31  Kai Tietz  <kai.tietz@onevision.com>
+
+       * coff-i386.c (in_reloc_p): Check also for R_SECREL32.
+       * coff-x86_64.c (in_reloc_p): Check also for R_AMD64_SECREL.
+
 2010-03-31  Alan Modra  <amodra@gmail.com>
 
        * elf64-ppc.c (ppc64_elf_relocate_section): Nop out optimized
index e7c4e8a27942c6d5f957c88d0da7c346c2fd0c64..57c47d035489b059d4f5375b448a866bd4afba05 100644 (file)
@@ -195,7 +195,8 @@ static bfd_boolean in_reloc_p (abfd, howto)
      bfd * abfd ATTRIBUTE_UNUSED;
      reloc_howto_type *howto;
 {
-  return ! howto->pc_relative && howto->type != R_IMAGEBASE;
+  return ! howto->pc_relative && howto->type != R_IMAGEBASE
+        && howto->type != R_SECREL32;
 }
 #endif /* COFF_WITH_PE */
 
index 4d500fe7cd5da5b9e49d6bf06a1b5bfea82bd537..8083d978dd98d1550a46375787c3ea7e92d0acd9 100644 (file)
@@ -192,7 +192,8 @@ coff_amd64_reloc (bfd *abfd,
 static bfd_boolean
 in_reloc_p (bfd *abfd ATTRIBUTE_UNUSED, reloc_howto_type *howto)
 {
-  return ! howto->pc_relative && howto->type != R_AMD64_IMAGEBASE;
+  return ! howto->pc_relative && howto->type != R_AMD64_IMAGEBASE
+        && howto->type != R_AMD64_SECREL;
 }
 #endif /* COFF_WITH_PE */
 
@@ -555,10 +556,10 @@ coff_amd64_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
 #if defined(COFF_WITH_PE)
   /* Cancel out code in _bfd_coff_generic_relocate_section.  */
   *addendp = 0;
-  if (rel->r_type >= R_AMD64_PCRLONG_1 && rel->r_type <= R_AMD64_PCRLONG_5)\r
-    {\r
-      *addendp -= (bfd_vma)(rel->r_type - R_AMD64_PCRLONG);\r
-      rel->r_type = R_AMD64_PCRLONG;\r
+  if (rel->r_type >= R_AMD64_PCRLONG_1 && rel->r_type <= R_AMD64_PCRLONG_5)
+    {
+      *addendp -= (bfd_vma)(rel->r_type - R_AMD64_PCRLONG);
+      rel->r_type = R_AMD64_PCRLONG;
     }
 #endif