aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-xtensa/call_overflow3.s
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2019-02-15 16:43:23 -0800
committerMax Filippov <jcmvbkbc@gmail.com>2019-02-20 02:51:01 -0800
commiteed62915fd5b733632af343fbf3d47c7364f8e36 (patch)
treeeaa3e22f860ab7872196fea0cd0f7740d4b6da80 /ld/testsuite/ld-xtensa/call_overflow3.s
parente6c3b5bfb449d1a02d26f3c4bae5b732951479fc (diff)
downloadgdb-eed62915fd5b733632af343fbf3d47c7364f8e36.zip
gdb-eed62915fd5b733632af343fbf3d47c7364f8e36.tar.gz
gdb-eed62915fd5b733632af343fbf3d47c7364f8e36.tar.bz2
bfd: xtensa: fix callx relaxation
Big section alignment requirements between source and destination of a long call can result in making call range bigger than what's reachable by the call opcode. Add biggest section alignment of sections between the call site and call destination to the call distance when making long call relaxation decision. 2019-02-20 Eric Tsai <erictsai@cadence.com> bfd/ * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output sections between the call site and call destination and adjust call distance by the largest alignment. ld/ * testsuite/ld-xtensa/call_overflow.d: New test definition. * testsuite/ld-xtensa/call_overflow1.s: New test source. * testsuite/ld-xtensa/call_overflow2.s: New test source. * testsuite/ld-xtensa/call_overflow3.s: New test source. * testsuite/ld-xtensa/xtensa.exp: Add call_overflow test.
Diffstat (limited to 'ld/testsuite/ld-xtensa/call_overflow3.s')
-rw-r--r--ld/testsuite/ld-xtensa/call_overflow3.s5
1 files changed, 5 insertions, 0 deletions
diff --git a/ld/testsuite/ld-xtensa/call_overflow3.s b/ld/testsuite/ld-xtensa/call_overflow3.s
new file mode 100644
index 0000000..33f59d8
--- /dev/null
+++ b/ld/testsuite/ld-xtensa/call_overflow3.s
@@ -0,0 +1,5 @@
+ .text
+ .align 32
+ .global b
+b:
+ j b