aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2007-07-25 14:39:48 +0000
committerPaul Brook <paul@codesourcery.com>2007-07-25 14:39:48 +0000
commitd08ec383512c6998263889ee636e033d4f167f1f (patch)
tree79002b8e09c21d997138dcd84ba7f2c7fabc49fe /ld
parent642c7534bd889725429fcf98002e5960e4b71cf9 (diff)
downloadgdb-d08ec383512c6998263889ee636e033d4f167f1f.zip
gdb-d08ec383512c6998263889ee636e033d4f167f1f.tar.gz
gdb-d08ec383512c6998263889ee636e033d4f167f1f.tar.bz2
2007-06-29 Paul Brook <paul@codesourcery.com>
* ld-arm/arm-elf.exp (armelftests): Add callweak. * ld-arm/callweak.d: New test. * ld-arm/callweak.s: New test.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ld-arm/callweak.d17
-rw-r--r--ld/testsuite/ld-arm/callweak.s16
2 files changed, 33 insertions, 0 deletions
diff --git a/ld/testsuite/ld-arm/callweak.d b/ld/testsuite/ld-arm/callweak.d
new file mode 100644
index 0000000..3dffcc4
--- /dev/null
+++ b/ld/testsuite/ld-arm/callweak.d
@@ -0,0 +1,17 @@
+
+.*: file format.*
+
+Disassembly of section .far:
+
+12340000 <[^>]*>:
+12340000: eaffffff b 12340004 <[^>]*>
+12340004: 0affffff beq 12340008 <[^>]*>
+
+12340008 <[^>]*>:
+12340008: e000 b.n 1234000c <[^>]*>
+1234000a: bf00 nop
+1234000c: 2000 movs r0, #0
+1234000e: e000 b.n 12340012 <[^>]*>
+12340010: bf00 nop
+12340012: 4770 bx lr
+
diff --git a/ld/testsuite/ld-arm/callweak.s b/ld/testsuite/ld-arm/callweak.s
new file mode 100644
index 0000000..6850da3
--- /dev/null
+++ b/ld/testsuite/ld-arm/callweak.s
@@ -0,0 +1,16 @@
+ .syntax unified
+ .weak bar
+ .section .far, "ax", %progbits
+ .global _start
+ .type _start, %function
+_start:
+ bl bar
+ bleq bar
+ .thumb
+ .type foo, %function
+ .thumb_func
+foo:
+ bl bar
+ movs r0, #0
+ bl bar
+ bx lr