summaryrefslogtreecommitdiff
path: root/gas/write.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2013-05-29 16:22:13 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2013-05-29 16:22:13 +0000
commitcc42629364b1c8625999c2756859603b80f07ed2 (patch)
tree31cfa0233a21535cd8a7b9abccb8daf8549f595c /gas/write.c
parent8a65b2863686dfc5a7aeb645a542fadd9e4996d8 (diff)
downloadbinutils-redhat-cc42629364b1c8625999c2756859603b80f07ed2.tar.gz
gas/
* write.c (resolve_reloc_expr_symbols): On REL targets don't convert relocs who have no relocatable field either. Rephrase the conditional so that the PC-relative check is only applied for REL targets. gas/testsuite/ * gas/mips/jalr3.d: New test. * gas/mips/jalr3-n32.d: New test. * gas/mips/jalr3-n64.d: New test. * gas/mips/jalr3.s: New test source. * gas/mips/mips.exp: Run the new tests. ld/testsuite/ * ld-mips-elf/jalr3.dd: New test. * ld-mips-elf/jalr3.ld: New test linker script. * ld-mips-elf/mips-elf.exp: Run the new test.
Diffstat (limited to 'gas/write.c')
-rw-r--r--gas/write.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gas/write.c b/gas/write.c
index 22e68c5ec8..745abe66d8 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -722,9 +722,10 @@ resolve_reloc_expr_symbols (void)
unless it has enough bits to cover the whole address
space. */
if (S_IS_LOCAL (sym) && !symbol_section_p (sym)
- && !(howto->partial_inplace
- && howto->pc_relative
- && howto->src_mask != addr_mask))
+ && (sec->use_rela_p
+ || (howto->partial_inplace
+ && (!howto->pc_relative
+ || howto->src_mask == addr_mask))))
{
asection *symsec = S_GET_SEGMENT (sym);
if (!(((symsec->flags & SEC_MERGE) != 0