aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-rl78.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-rl78.c')
-rw-r--r--bfd/elf32-rl78.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elf32-rl78.c b/bfd/elf32-rl78.c
index 1bb5edc..acd82b9 100644
--- a/bfd/elf32-rl78.c
+++ b/bfd/elf32-rl78.c
@@ -2338,7 +2338,8 @@ rl78_elf_relax_section
}
- if ((irel->r_addend & RL78_RELAXA_MASK) == RL78_RELAXA_ADDR16)
+ if ((irel->r_addend & RL78_RELAXA_MASK) == RL78_RELAXA_ADDR16
+ && nrelocs > 0)
{
/*----------------------------------------------------------------------*/
/* Some insns have both a 16-bit address operand and an 8-bit