This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch] rl78: fix relax type logic
- From: DJ Delorie <dj at redhat dot com>
- To: binutils at sourceware dot org
- Date: Tue, 26 Aug 2014 14:04:46 -0400
- Subject: [patch] rl78: fix relax type logic
- Authentication-results: sourceware.org; auth=none
Committed.
* elf32-rl78.c (rl78_elf_relax_section): Disambiguate test for
relaxation type.
diff --git a/bfd/elf32-rl78.c b/bfd/elf32-rl78.c
index 9124e0a..2a5ec99 100644
--- a/bfd/elf32-rl78.c
+++ b/bfd/elf32-rl78.c
@@ -2199,7 +2199,7 @@ rl78_elf_relax_section
61 F3 EF ad SKNH ; BR $rel8
*/
- if (irel->r_addend & RL78_RELAXA_BRA)
+ if ((irel->r_addend & RL78_RELAXA_MASK) == RL78_RELAXA_BRA)
{
/* SKIP opcodes that skip non-branches will have a relax tag
but no corresponding symbol to relax against; we just
@@ -2334,7 +2334,7 @@ rl78_elf_relax_section
}
- if (irel->r_addend & RL78_RELAXA_ADDR16)
+ if ((irel->r_addend & RL78_RELAXA_MASK) == RL78_RELAXA_ADDR16)
{
/*----------------------------------------------------------------------*/
/* Some insns have both a 16-bit address operand and an 8-bit