aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-arm/thumb-bl-lks-sym.s
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2013-06-13 12:36:02 +0000
committerNick Clifton <nickc@redhat.com>2013-06-13 12:36:02 +0000
commit2f47f5fc1338185064d87c4ab54773a9f4cfe796 (patch)
treee84941b49ccded12a0fbd2ae29dbb6dd448c65d6 /ld/testsuite/ld-arm/thumb-bl-lks-sym.s
parent909c7f9cbf0b6c33f14a68be54723c89cfbadf8c (diff)
downloadgdb-2f47f5fc1338185064d87c4ab54773a9f4cfe796.zip
gdb-2f47f5fc1338185064d87c4ab54773a9f4cfe796.tar.gz
gdb-2f47f5fc1338185064d87c4ab54773a9f4cfe796.tar.bz2
PR ld/15302
* elf32-arm.c (allocate_dynrelocs_for_symbol): Transform ST_BRANCH_TO_ARM into ST_BRANCH_TO_THUMB if the target only supports thumb instructions. PR ld/15302 * ld-arm/branch-lks-sym.ld: New script. * ld-arm/thumb-b-lks-sym.s: New test. * ld-arm/thumb-b-lks-sym.d: Expected disassembly. * ld-arm/thumb-bl-lks-sym.s: New test. * ld-arm/thumb-bl-lks-sym.d: Expected disassembly. * ld-arm/arm-elf.exp: Run the new tests.
Diffstat (limited to 'ld/testsuite/ld-arm/thumb-bl-lks-sym.s')
-rw-r--r--ld/testsuite/ld-arm/thumb-bl-lks-sym.s19
1 files changed, 19 insertions, 0 deletions
diff --git a/ld/testsuite/ld-arm/thumb-bl-lks-sym.s b/ld/testsuite/ld-arm/thumb-bl-lks-sym.s
new file mode 100644
index 0000000..60b7c3a
--- /dev/null
+++ b/ld/testsuite/ld-arm/thumb-bl-lks-sym.s
@@ -0,0 +1,19 @@
+@ Test to ensure that the bl to linker script symbol isn't changed to blx with immediate address.
+
+
+ .syntax unified
+ .cpu cortex-m3
+ .fpu softvfp
+ .thumb
+ .file "x.c"
+ .text
+ .align 2
+ .global main
+ .thumb
+ .thumb_func
+ .type main, %function
+main:
+ push {r7, lr}
+ add r7, sp, #0
+ bl extFunc
+ pop {r7, pc}