* cofflink.c (_bfd_coff_generic_relocate_section): If doing a
authorIan Lance Taylor <ian@airs.com>
Mon, 3 Feb 1997 20:31:39 +0000 (20:31 +0000)
committerIan Lance Taylor <ian@airs.com>
Mon, 3 Feb 1997 20:31:39 +0000 (20:31 +0000)
relocateable link, just skip pc_relative pcrel_offset relocs.
* coff-arm.c (coff_arm_rtype_to_howto): Return a different howto
structure for an ARM26 reloc which can be resolved.
(coff_arm_adjust_symndx): Only convert ARM26 to ARM26D if the
reloc can be resolved.
PR 11599.

bfd/ChangeLog
bfd/cofflink.c

index 3b87aab9449f466c6501d98d0bdf9d331e95840d..c8ba2fd255620a50deb38eae806fd566364dc68e 100644 (file)
@@ -1,5 +1,12 @@
 Mon Feb  3 11:54:06 1997  Ian Lance Taylor  <ian@cygnus.com>
 
+       * cofflink.c (_bfd_coff_generic_relocate_section): If doing a
+       relocateable link, just skip pc_relative pcrel_offset relocs.
+       * coff-arm.c (coff_arm_rtype_to_howto): Return a different howto
+       structure for an ARM26 reloc which can be resolved.
+       (coff_arm_adjust_symndx): Only convert ARM26 to ARM26D if the
+       reloc can be resolved.
+
        * coff-h8300.c (h8300_reloc16_extra_cases): Correct off by one
        error in overflow check for R_RELBYTE.
 
index 8e11b09b740a2c21307cff9c3bd9c6b21059121b..cd76985c99e0d58ca86427df473fbeb37b2e1877 100644 (file)
@@ -1,5 +1,5 @@
 /* COFF specific linker code.
-   Copyright 1994, 1995, 1996 Free Software Foundation, Inc.
+   Copyright 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -2423,6 +2423,14 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
       if (howto == NULL)
        return false;
 
+      /* If we are doing a relocateable link, then we can just ignore
+         a PC relative reloc that is pcrel_offset.  It will already
+         have the correct value.  */
+      if (info->relocateable
+         && howto->pc_relative
+         && howto->pcrel_offset)
+       continue;
+
       val = 0;
 
       if (h == NULL)
@@ -2497,10 +2505,10 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
          break;
        case bfd_reloc_outofrange:
          (*_bfd_error_handler)
-           ("%s: bad reloc address in section `%s' at address 0x%lx",
+           ("%s: bad reloc address 0x%lx in section `%s'",
             bfd_get_filename (input_bfd),
-            bfd_get_section_name (input_bfd, input_section),
-            (unsigned long) rel->r_vaddr);
+            (unsigned long) rel->r_vaddr,
+            bfd_get_section_name (input_bfd, input_section));
          return false;
        case bfd_reloc_overflow:
          {
This page took 0.045769 seconds and 4 git commands to generate.