diff options
Diffstat (limited to 'bfd/elf32-sh.c')
-rw-r--r-- | bfd/elf32-sh.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index 39a837c..e078e41 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -1429,9 +1429,9 @@ sh_elf_swap_insns (bfd *abfd, asection *sec, void *relocs, off = irel->r_offset + 4 + irel->r_addend; if (off == addr) - irel->r_offset += 2; + irel->r_addend += 2; else if (off == addr + 2) - irel->r_offset -= 2; + irel->r_addend -= 2; } if (irel->r_offset == addr) @@ -2962,7 +2962,7 @@ sh_elf_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* Set the contents of the .interp section to the interpreter. */ if (bfd_link_executable (info) && !info->nointerp) { - s = bfd_get_linker_section (dynobj, ".interp"); + s = htab->root.interp; BFD_ASSERT (s != NULL); s->size = sizeof ELF_DYNAMIC_INTERPRETER; s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER; @@ -3697,7 +3697,8 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (sec != NULL && discarded_section (sec)) RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, - rel, 1, relend, howto, 0, contents); + rel, 1, relend, R_SH_NONE, + howto, 0, contents); if (bfd_link_relocatable (info)) continue; |