Fixes a problem generating relocs for import libraries created by Microsoft tools...
authorNick Clifton <nickc@redhat.com>
Wed, 18 Mar 2015 16:19:59 +0000 (16:19 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 18 Mar 2015 16:19:59 +0000 (16:19 +0000)
PR ld/16598
* peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
suitable for the AMD64.

bfd/ChangeLog
bfd/peicode.h

index c5f109e1618408afd16391b2caf284923ebf6037..dcc93fddaafa779ada8a9a73783492d2b11bc971 100644 (file)
@@ -1,3 +1,9 @@
+2015-03-18  Eric Youngdale  <eyoungdale@ptc.com>
+
+       PR ld/16598
+       * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
+       suitable for the AMD64.
+
 2015-03-18  Jon Turney  <jon.turney@dronecode.org.uk>
            Nick Clifton  <nickc@redhat.com>
 
index e36568aa2070ab5fa5282c0ddcf19f934d039a2e..200ef5e88476210d46387fe9da242aacb4d8ef59 100644 (file)
@@ -972,6 +972,15 @@ pe_ILF_build_a_bfd (bfd *           abfd,
                                      imp_index);
        }
       else
+#endif
+#ifdef AMD64MAGIC
+      if (magic == AMD64MAGIC)
+       {
+         pe_ILF_make_a_symbol_reloc (&vars, (bfd_vma) jtab[i].offset,
+                                     BFD_RELOC_32_PCREL, (asymbol **) imp_sym,
+                                     imp_index);
+       }
+      else
 #endif
        pe_ILF_make_a_symbol_reloc (&vars, (bfd_vma) jtab[i].offset,
                                    BFD_RELOC_32, (asymbol **) imp_sym,