diff options
author | Alan Modra <amodra@bigpond.net.au> | 2000-11-07 05:49:30 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2000-11-07 05:49:30 +0000 |
commit | 652db170185cfc1eb73fa0a466b741a8f51e3489 (patch) | |
tree | 896be1783d6e41087cd49feef7ecce19392d64bf | |
parent | 2fc836e3fbe867c4e62e0fef81e0121f1507f6cb (diff) | |
download | gdb-652db170185cfc1eb73fa0a466b741a8f51e3489.tar.gz |
H8 ld -r fix, and trunk 2000-04-03 patch.
-rw-r--r-- | bfd/ChangeLog | 8 | ||||
-rw-r--r-- | bfd/coff-h8300.c | 15 |
2 files changed, 19 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 9e1fb765c67..638ea679922 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,11 @@ +2000-11-07 Alan Modra <alan@linuxcare.com.au> + + * coff-h8300.c (special): Adjust reloc address. + + From mainline 2000-04-03 Kazu Hirata <kazu@hxi.com> + * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to + the R_PCRWORD_B case. + 2000-11-05 Philip Blundell <philb@gnu.org> * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit diff --git a/bfd/coff-h8300.c b/bfd/coff-h8300.c index 3d54f20a926..c86c4b94422 100644 --- a/bfd/coff-h8300.c +++ b/bfd/coff-h8300.c @@ -192,18 +192,18 @@ h8300_coff_link_hash_table_create (abfd) return &ret->root.root; } -/* special handling for H8/300 relocs. +/* Special handling for H8/300 relocs. We only come here for pcrel stuff and return normally if not an -r link. When doing -r, we can't do any arithmetic for the pcrel stuff, because the code in reloc.c assumes that we can manipulate the targets of the pcrel branches. This isn't so, since the H8/300 can do relaxing, which means that the gap after the instruction may not be enough to - contain the offset required for the branch, so we have to use the only - the addend until the final link */ + contain the offset required for the branch, so we have to use only + the addend until the final link. */ static bfd_reloc_status_type special (abfd, reloc_entry, symbol, data, input_section, output_bfd, - error_message) + error_message) bfd *abfd ATTRIBUTE_UNUSED; arelent *reloc_entry ATTRIBUTE_UNUSED; asymbol *symbol ATTRIBUTE_UNUSED; @@ -215,6 +215,8 @@ special (abfd, reloc_entry, symbol, data, input_section, output_bfd, if (output_bfd == (bfd *) NULL) return bfd_reloc_continue; + /* Adjust the reloc address to that in the output section. */ + reloc_entry->address += input_section->output_offset; return bfd_reloc_ok; } @@ -902,6 +904,11 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr, bfd_put_8 (abfd, tmp, data + dst_address - 2); break; + case 0x5c: + /* bsr:16 -> bsr:8 */ + bfd_put_8 (abfd, 0x55, data + dst_address - 2); + break; + default: abort (); } |