aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-arm
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-arm')
-rw-r--r--ld/testsuite/ld-arm/arm-elf.exp1
-rw-r--r--ld/testsuite/ld-arm/thumb2-bl-undefweak1.d9
-rw-r--r--ld/testsuite/ld-arm/thumb2-bl-undefweak1.s9
3 files changed, 19 insertions, 0 deletions
diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp
index 3625ddb..94002a1 100644
--- a/ld/testsuite/ld-arm/arm-elf.exp
+++ b/ld/testsuite/ld-arm/arm-elf.exp
@@ -185,6 +185,7 @@ run_dump_test "group-relocs-ldr-bad"
run_dump_test "group-relocs-ldrs-bad"
run_dump_test "group-relocs-ldc-bad"
run_dump_test "thumb2-bl-undefweak"
+run_dump_test "thumb2-bl-undefweak1"
run_dump_test "emit-relocs1"
# Exclude non-ARM-EABI targets.
diff --git a/ld/testsuite/ld-arm/thumb2-bl-undefweak1.d b/ld/testsuite/ld-arm/thumb2-bl-undefweak1.d
new file mode 100644
index 0000000..929d180
--- /dev/null
+++ b/ld/testsuite/ld-arm/thumb2-bl-undefweak1.d
@@ -0,0 +1,9 @@
+#source: thumb2-bl-undefweak1.s
+#as:
+#ld: -shared
+#objdump: -dr
+#...
+Disassembly of section .text:
+
+.* <foo>:
+ .*: ........ bl ... <foo-0x.*>
diff --git a/ld/testsuite/ld-arm/thumb2-bl-undefweak1.s b/ld/testsuite/ld-arm/thumb2-bl-undefweak1.s
new file mode 100644
index 0000000..a302811
--- /dev/null
+++ b/ld/testsuite/ld-arm/thumb2-bl-undefweak1.s
@@ -0,0 +1,9 @@
+@ Test that calls to undefined weak functions resolve to call through
+@ the PLT in shared libraries in ARM mode.
+
+ .arch armv6
+ .syntax unified
+ .text
+foo:
+ bl bar
+ .weak bar