RL78 - fix ADDR16 relax

* elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
there's a symbol.
This commit is contained in:
DJ Delorie 2015-03-03 17:49:44 -05:00
parent b072f6c163
commit 71eef2bd8d
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2015-03-03 DJ Delorie <dj@redhat.com>
* elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
there's a symbol.
2015-02-28 Alan Modra <amodra@gmail.com> 2015-02-28 Alan Modra <amodra@gmail.com>
* elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if

View File

@ -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 /* Some insns have both a 16-bit address operand and an 8-bit