summaryrefslogtreecommitdiff
path: root/bfd/elf32-h8300.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-07-04 10:25:14 +0000
committerNick Clifton <nickc@redhat.com>2003-07-04 10:25:14 +0000
commit637153dc6ac891e46cf0730e4f61fca7e238fa8e (patch)
tree03afa7f67c36363e446f34293d87be794f679791 /bfd/elf32-h8300.c
parent2001346c0a35b1dcdddb0e276bfed30ffcc6f2dc (diff)
downloadbinutils-redhat-637153dc6ac891e46cf0730e4f61fca7e238fa8e.tar.gz
* elf32-h8300.c (R_H8_DIR32A16): Fix name field.
(elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation. <R_H8_DIR32A16>: 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.
Diffstat (limited to 'bfd/elf32-h8300.c')
-rw-r--r--bfd/elf32-h8300.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c
index 1b623f27f2..386c92ff24 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,