summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2004-01-13 21:09:18 +0000
committerDaniel Jacobowitz <dan@debian.org>2004-01-13 21:09:18 +0000
commiteb3fd5e3a926714df958e70f5bbe71a4776608d7 (patch)
tree6a05439c9222917b14b4aaee254b78e102d53ae9
parent15db3a1dd15b63a942bcc3aba00b99e58a83ac8f (diff)
downloadbinutils-redhat-eb3fd5e3a926714df958e70f5bbe71a4776608d7.tar.gz
* ld-arm/arm-elf.exp: Add arm-static-app test.
* ld-arm/arm-static-app.s, ld-arm/arm-static-app.d, ld-arm/arm-static-app.r: New files.
-rw-r--r--ld/testsuite/ChangeLog6
-rw-r--r--ld/testsuite/ld-arm/arm-elf.exp3
-rw-r--r--ld/testsuite/ld-arm/arm-static-app.d24
-rw-r--r--ld/testsuite/ld-arm/arm-static-app.r3
-rw-r--r--ld/testsuite/ld-arm/arm-static-app.s20
5 files changed, 56 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index e031bd6131..581c20eb1f 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2004-01-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * ld-arm/arm-elf.exp: Add arm-static-app test.
+ * ld-arm/arm-static-app.s, ld-arm/arm-static-app.d,
+ ld-arm/arm-static-app.r: New files.
+
2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
* ld-h8300/h8300-exp: Run the relax-4 test.
diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp
index 0f9974196b..581ebb6292 100644
--- a/ld/testsuite/ld-arm/arm-elf.exp
+++ b/ld/testsuite/ld-arm/arm-elf.exp
@@ -41,6 +41,9 @@ set armelftests {
{"Simple dynamic application" "tmpdir/arm-lib.so" "" {arm-app.s}
{{objdump -fdw arm-app.d} {objdump -Rw arm-app.r}}
"arm-app"}
+ {"Simple static application" "" "" {arm-static-app.s}
+ {{objdump -fdw arm-static-app.d} {objdump -rw arm-static-app.r}}
+ "arm-static-app"}
}
run_ld_link_tests $armelftests
diff --git a/ld/testsuite/ld-arm/arm-static-app.d b/ld/testsuite/ld-arm/arm-static-app.d
new file mode 100644
index 0000000000..2d39b55c2e
--- /dev/null
+++ b/ld/testsuite/ld-arm/arm-static-app.d
@@ -0,0 +1,24 @@
+
+tmpdir/arm-static-app: file format elf32-littlearm
+architecture: arm, flags 0x00000112:
+EXEC_P, HAS_SYMS, D_PAGED
+start address 0x.*
+
+Disassembly of section .text:
+
+.* <_start>:
+ .*: e1a0c00d mov ip, sp
+ .*: e92dd800 stmdb sp!, {fp, ip, lr, pc}
+ .*: eb000001 bl .* <app_func>
+ .*: e89d6800 ldmia sp, {fp, sp, lr}
+ .*: e12fff1e bx lr
+
+.* <app_func>:
+ .*: e1a0c00d mov ip, sp
+ .*: e92dd800 stmdb sp!, {fp, ip, lr, pc}
+ .*: eb000001 bl .* <app_func2>
+ .*: e89d6800 ldmia sp, {fp, sp, lr}
+ .*: e12fff1e bx lr
+
+.* <app_func2>:
+ .*: e12fff1e bx lr
diff --git a/ld/testsuite/ld-arm/arm-static-app.r b/ld/testsuite/ld-arm/arm-static-app.r
new file mode 100644
index 0000000000..7c350dcb97
--- /dev/null
+++ b/ld/testsuite/ld-arm/arm-static-app.r
@@ -0,0 +1,3 @@
+
+tmpdir/arm-static-app: file format elf32-littlearm
+
diff --git a/ld/testsuite/ld-arm/arm-static-app.s b/ld/testsuite/ld-arm/arm-static-app.s
new file mode 100644
index 0000000000..99c579f0b4
--- /dev/null
+++ b/ld/testsuite/ld-arm/arm-static-app.s
@@ -0,0 +1,20 @@
+ .text
+ .globl _start
+_start:
+ mov ip, sp
+ stmdb sp!, {r11, ip, lr, pc}
+ bl app_func
+ ldmia sp, {r11, sp, lr}
+ bx lr
+
+ .globl app_func
+app_func:
+ mov ip, sp
+ stmdb sp!, {r11, ip, lr, pc}
+ bl app_func2
+ ldmia sp, {r11, sp, lr}
+ bx lr
+
+ .globl app_func2
+app_func2:
+ bx lr