aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2002-12-01 13:24:03 +0000
committerStephane Carrez <stcarrez@nerim.fr>2002-12-01 13:24:03 +0000
commit304916478207cd089d547802cf04dc810b718a6d (patch)
tree600e577c7683e96bb67e47edefafe4c3711a294f
parentbc7c6a9029e2590f0715a88193da72c5e5451e1d (diff)
downloadgdb-304916478207cd089d547802cf04dc810b718a6d.zip
gdb-304916478207cd089d547802cf04dc810b718a6d.tar.gz
gdb-304916478207cd089d547802cf04dc810b718a6d.tar.bz2
Fix PR savannah/1417:
* elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust branch if it goes to the start of the deleted region.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf32-m68hc11.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index ae96c5a..15468ab 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,11 @@
2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
+ Fix PR savannah/1417:
+ * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
+ branch if it goes to the start of the deleted region.
+
+2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
+
* bfd-in2.h (bfd_mach_m6812): Rebuild.
* archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
bfd_mach_m6812s): Declare.
diff --git a/bfd/elf32-m68hc11.c b/bfd/elf32-m68hc11.c
index aa6cb51..98ea6a6 100644
--- a/bfd/elf32-m68hc11.c
+++ b/bfd/elf32-m68hc11.c
@@ -1194,7 +1194,7 @@ m68hc11_elf_relax_delete_bytes (abfd, sec, addr, count)
offset = bfd_get_8 (abfd, contents + irel->r_offset + branch_pos);
raddr += old_offset;
raddr += ((unsigned short) offset | ((offset & 0x80) ? 0xff00 : 0));
- if (irel->r_offset < addr && raddr >= addr)
+ if (irel->r_offset < addr && raddr > addr)
{
offset -= count;
bfd_put_8 (abfd, offset, contents + irel->r_offset + branch_pos);