]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add support for absolute PE/x86 relocations.
authorNick Clifton <nickc@redhat.com>
Wed, 29 Apr 2015 11:26:46 +0000 (12:26 +0100)
committerNick Clifton <nickc@redhat.com>
Wed, 29 Apr 2015 11:26:46 +0000 (12:26 +0100)
PR 17099
* coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG
relocs.

bfd/ChangeLog
bfd/coff-i386.c

index 2b4b32f8dde505ddff3807b8cac67a49f4adb64b..db19e8a5763ffe88ce4b8cc01ffa086bc9ec5422 100644 (file)
@@ -1,3 +1,9 @@
+2015-04-29  Nick Clifton  <nickc@redhat.com>
+
+       PR 17099
+       * coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG
+       relocs.
+
 2015-04-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
 
        * elf-s390-common.c (elf_s390_merge_obj_attributes): New function.
index 20d240204a156af723d14b5a1b2263be8ae44bed..b185b81803f280c87a26fc3d74a8beec4fdefe94 100644 (file)
@@ -509,7 +509,12 @@ coff_i386_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
       *addendp -= pe_data(sec->output_section->owner)->pe_opthdr.ImageBase;
     }
 
-  BFD_ASSERT (sym != NULL);
+  /* PR 17099 - Absolute R_PCRLONG relocations do not need a symbol.  */
+  if (rel->r_type == R_PCRLONG && sym == NULL)
+    *addendp -= rel->r_vaddr;
+  else
+    BFD_ASSERT (sym != NULL);
+
   if (rel->r_type == R_SECREL32 && sym != NULL)
     {
       bfd_vma osect_vma;