From: Stephane Carrez Date: Sun, 1 Dec 2002 13:24:03 +0000 (+0000) Subject: Fix PR savannah/1417: X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=304916478207cd089d547802cf04dc810b718a6d;p=binutils-gdb.git 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ae96c5a3c4b..15468ab4a06 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2002-12-01 Stephane Carrez + + 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 * bfd-in2.h (bfd_mach_m6812): Rebuild. diff --git a/bfd/elf32-m68hc11.c b/bfd/elf32-m68hc11.c index aa6cb515161..98ea6a69cd5 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);