aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-sh.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-01-23 22:32:18 +0000
committerIan Lance Taylor <ian@airs.com>1995-01-23 22:32:18 +0000
commit6e3acf74d0fd966128b0d68bf94bf6bc4bd5d5cd (patch)
tree1e9a75414dec849ab3aa4fe007f0360ad12fbe37 /bfd/coff-sh.c
parent1b0c5a4fbb7352ff544f57c3b3acaf853c3f706b (diff)
downloadfsf-binutils-gdb-6e3acf74d0fd966128b0d68bf94bf6bc4bd5d5cd.zip
fsf-binutils-gdb-6e3acf74d0fd966128b0d68bf94bf6bc4bd5d5cd.tar.gz
fsf-binutils-gdb-6e3acf74d0fd966128b0d68bf94bf6bc4bd5d5cd.tar.bz2
* coff-sh.c (sh_reloc): Don't ignore the previous contents of an
R_SH_IMM32 reloc. PR 6215.
Diffstat (limited to 'bfd/coff-sh.c')
-rw-r--r--bfd/coff-sh.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c
index 80f4af4..3a9c76d 100644
--- a/bfd/coff-sh.c
+++ b/bfd/coff-sh.c
@@ -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 */