Move x86_64 PE changes out of bfd_perform_relocation
[deliverable/binutils-gdb.git] / bfd / reloc.c
index a7547187ebeef370fb8cd29301225e55fd7fcd22..5ed7bb8e5960d3a8ee3c974a57ba928a41bb1d45 100644 (file)
@@ -51,7 +51,7 @@ SECTION
 #include "bfdlink.h"
 #include "libbfd.h"
 #include "bfdver.h"
-#include "coff/x86_64.h"
+
 /*
 DOCDD
 INODE
@@ -905,30 +905,6 @@ space consuming.  For each target:
            }
        }
     }
-  else if (abfd->xvec->flavour == bfd_target_coff_flavour
-          && (input_section->output_section->owner->xvec->flavour
-              == bfd_target_elf_flavour)
-          && strcmp (abfd->xvec->name, "pe-x86-64") == 0
-          && strcmp (input_section->output_section->owner->xvec->name,
-                     "elf64-x86-64") == 0)
-    {
-      /* NB: bfd_perform_relocation isn't called to generate PE binary.
-        _bfd_relocate_contents is called instead.  When linking PE
-        object files to generate ELF output, _bfd_relocate_contents
-        isn't called and bfd_perform_relocation is used.  We need to
-        adjust relocation here.  */
-      relocation -= reloc_entry->addend;
-      if (howto->type >= R_AMD64_PCRLONG_1
-         && howto->type <= R_AMD64_PCRLONG_5)
-       relocation -= (bfd_vma)(howto->type - R_AMD64_PCRLONG);
-      else if (howto->type == R_AMD64_DIR64
-              || howto->type == R_AMD64_DIR32)
-       {
-         bfd_vma val = read_reloc (abfd, (bfd_byte *) data + octets,
-                                   howto);
-         relocation -= val & howto->src_mask;
-       }
-    }
 
   /* FIXME: This overflow checking is incomplete, because the value
      might have overflowed before we get here.  For a correct check we
This page took 0.023356 seconds and 4 git commands to generate.