]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gas: sparc: fix relaxation of CALL instruction into branches in a.out targets
authorJose E. Marchesi <jose.marchesi@oracle.com>
Tue, 25 Apr 2017 09:40:43 +0000 (02:40 -0700)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Tue, 25 Apr 2017 09:40:43 +0000 (02:40 -0700)
commitd28b6364b1fba1c0270c001f0d82a69e351e1922
tree61ff672a6b23b9d9c6874cdc79c64cdde890c8d7
parentb0b92aeb3828219075fce23543fb39fee8608e99
gas: sparc: fix relaxation of CALL instruction into branches in a.out targets

This patch avoids CALL instructions to be optimized into branches if
the symbols referred to in the CALL instruction are not fully resolved
at the time the assembler writes its output.

Tested in sparc64-linux-gnu and sparc-sun-sunos4.1.3 targets.
No regressions.

gas/ChangeLog:

2017-04-25  Jose E. Marchesi  <jose.marchesi@oracle.com>

PR gas/21407
* config/tc-sparc.c (md_apply_fix): Do not transform `call'
instructions into branch instructions in fixups generating
additional relocations.
* testsuite/gas/sparc/call-relax.s: New file.
* testsuite/gas/sparc/call-relax.d: Likewise.
* testsuite/gas/sparc/call-relax-aout.d: Likewise.
* testsuite/gas/sparc/sparc.exp: Test call-relax and call-relax-aout.
gas/ChangeLog
gas/config/tc-sparc.c
gas/testsuite/gas/sparc/call-relax-aout.d [new file with mode: 0644]
gas/testsuite/gas/sparc/call-relax.d [new file with mode: 0644]
gas/testsuite/gas/sparc/call-relax.s [new file with mode: 0644]
gas/testsuite/gas/sparc/sparc.exp