diff options
author | DJ Delorie <dj@redhat.com> | 2015-03-03 17:49:44 -0500 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2015-03-03 17:57:39 -0500 |
commit | 71eef2bd8dc3a37709908bf14a95c48b80c04c42 (patch) | |
tree | b0f9e047335abbccd926c555c74fcda0a08be811 /bfd/elf32-rl78.c | |
parent | b072f6c163b25ec90d592ca42aeb56bc88e8da0c (diff) | |
download | gdb-71eef2bd8dc3a37709908bf14a95c48b80c04c42.zip gdb-71eef2bd8dc3a37709908bf14a95c48b80c04c42.tar.gz gdb-71eef2bd8dc3a37709908bf14a95c48b80c04c42.tar.bz2 |
RL78 - fix ADDR16 relax
* elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
there's a symbol.
Diffstat (limited to 'bfd/elf32-rl78.c')
-rw-r--r-- | bfd/elf32-rl78.c | 3 |
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 |