]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* coff-sh.c (sh_reloc): Don't ignore the previous contents of an
authorIan Lance Taylor <ian@airs.com>
Mon, 23 Jan 1995 22:32:18 +0000 (22:32 +0000)
committerIan Lance Taylor <ian@airs.com>
Mon, 23 Jan 1995 22:32:18 +0000 (22:32 +0000)
R_SH_IMM32 reloc.
PR 6215.

bfd/ChangeLog
bfd/coff-sh.c

index 3a5840c717f93bc43ceceeaa6d7c2665c3508c1b..3b15f47688ab6b58c6a6b0a6762436fc03b4ea64 100644 (file)
@@ -1,5 +1,8 @@
 Mon Jan 23 13:33:18 1995  Ian Lance Taylor  <ian@sanguine.cygnus.com>
 
+       * coff-sh.c (sh_reloc): Don't ignore the previous contents of an
+       R_SH_IMM32 reloc.
+
        * config.bfd (i[345]86-*-gnu*): Set bfd_name to i386-gnu.
        * config/i386-gnu.mt: New file.  Include ELF support.
 
index 80f4af40cc455b5fdefc5e92a43359feb255f8cb..3a9c76d15a7ff692ecf522a9c7aab54f34301c36 100644 (file)
@@ -147,8 +147,8 @@ sh_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
   switch (r_type) 
     {
     case R_SH_IMM32:
-      /* We ignore the previous contents ! */
       insn = sym_value + reloc_entry->addend;  
+      insn += bfd_get_32 (abfd, hit_data);
       bfd_put_32(abfd, insn, hit_data);
       break;
     default:
@@ -308,12 +308,6 @@ const bfd_target shcoff_vec =
     COFF_SWAP_TABLE,
 };
 
-
-static int no_archive()
-{
-  bfd_set_error (bfd_error_wrong_format);
-  return 0;
-}
 const bfd_target shlcoff_vec =
 {
   "coff-shl",                  /* name */
@@ -341,7 +335,7 @@ const bfd_target shlcoff_vec =
    This is so that we only use one archive format for both
    object file types */
   {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
-     no_archive, _bfd_dummy_target},   
+     _bfd_dummy_target, _bfd_dummy_target},   
   {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
      bfd_false},
   {bfd_false, coff_write_object_contents,      /* bfd_write_contents */