(coff_arm_relocate_section): Do not alter relocs that are not partial_inplace
authorNick Clifton <nickc@redhat.com>
Thu, 8 Jan 2004 16:46:56 +0000 (16:46 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 8 Jan 2004 16:46:56 +0000 (16:46 +0000)
during a relocatable link.

bfd/ChangeLog
bfd/coff-arm.c

index 3bf3ed2a0bffd76da1189ed31ed1fc3d7fa2f08f..94aa94de2e0a0e36242e8bb011d4389733dd0759 100644 (file)
@@ -1,3 +1,8 @@
+2004-01-08  Dmitry Semyonov  <Dmitry.Semyonov@oktet.ru>
+
+       * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
+       are not partial_inplace during a relocatable link.
+
 2004-01-08  Kazu Hirata  <kazu@cs.umass.edu>
 
        * elf32-m68k.c (elf_m68k_gc_sweep_hook): Terminate early
index 9b2612327f886f9c3cb80e194948c4344074db46..79bae59a726e916bb8cbc6ee61551ed88bba6a81 100644 (file)
@@ -1734,10 +1734,13 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
 #endif
       else
 #endif /* THUMBEXTENSION */
-        rstat = _bfd_final_link_relocate (howto, input_bfd, input_section,
-                                          contents,
-                                          rel->r_vaddr - input_section->vma,
-                                          val, addend);
+        if (info->relocatable && ! howto->partial_inplace)
+            rstat = bfd_reloc_ok;
+        else
+         rstat = _bfd_final_link_relocate (howto, input_bfd, input_section,
+                                           contents,
+                                           rel->r_vaddr - input_section->vma,
+                                           val, addend);
 #if 1 /* THUMBEXTENSION */
       /* FIXME:
         Is this the best way to fix up thumb addresses? krk@cygnus.com