From 8c17da6e594c61837ef20620791a2e55d323d3d2 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 4 Jul 2003 10:25:14 +0000 Subject: * elf32-h8300.c (R_H8_DIR32A16): Fix name field. (elf32_h8_relax_section) : Adjust position of relocation. : Fix type of relocation. * ld-h8300/h8300.exp: Replace loop with explicit list. Run relax.d unconditionally. Run relax-2.d for *-elf targets. * ld-h8300/relax.d: Fix typo. * ld-h8300/relax.s: Add 0x prefixes. * ld-h8300/relad-2.[sd]: New test. --- bfd/elf32-h8300.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bfd/elf32-h8300.c') diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c index 1b623f2..386c92f 100644 --- a/bfd/elf32-h8300.c +++ b/bfd/elf32-h8300.c @@ -183,7 +183,7 @@ static reloc_howto_type h8_elf_howto_table[] = { 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ special, /* special_function */ - "R_H8_DIR32", /* name */ + "R_H8_DIR32A16", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ @@ -1076,6 +1076,9 @@ elf32_h8_relax_section (abfd, sec, link_info, again) irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_H8_DIR8); + /* Move the relocation. */ + irel->r_offset--; + /* Delete two bytes of data. */ if (!elf32_h8_relax_delete_bytes (abfd, sec, irel->r_offset + 1, 2)) @@ -1187,7 +1190,7 @@ elf32_h8_relax_section (abfd, sec, link_info, again) /* Fix the relocation's type. */ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), - R_H8_DIR16A8); + R_H8_DIR16); /* Delete two bytes of data. */ if (!elf32_h8_relax_delete_bytes (abfd, sec, -- cgit v1.1