* ld-arm/arm-app-abs32.s, ld-arm/arm-app-abs32.r,
authorDaniel Jacobowitz <drow@false.org>
Fri, 23 Jan 2004 16:51:39 +0000 (16:51 +0000)
committerDaniel Jacobowitz <drow@false.org>
Fri, 23 Jan 2004 16:51:39 +0000 (16:51 +0000)
ld-arm/arm-app-abs32.d: New files.
* ld-arm/arm-elf.exp: Add arm-app-abs32 testcase.

ld/testsuite/ChangeLog
ld/testsuite/ld-arm/arm-app-abs32.d [new file with mode: 0644]
ld/testsuite/ld-arm/arm-app-abs32.r [new file with mode: 0644]
ld/testsuite/ld-arm/arm-app-abs32.s [new file with mode: 0644]
ld/testsuite/ld-arm/arm-elf.exp

index 80c5d1eba764940c681fb22c2f790d6ae7f94ce2..7458855d057460c3e5d189a25bf559031f5e10ce 100644 (file)
@@ -1,3 +1,9 @@
+2004-01-23  Daniel Jacobowitz  <drow@mvista.com>
+
+       * ld-arm/arm-app-abs32.s, ld-arm/arm-app-abs32.r,
+       ld-arm/arm-app-abs32.d: New files.
+       * ld-arm/arm-elf.exp: Add arm-app-abs32 testcase.
+
 2004-01-19  Alan Modra  <amodra@bigpond.net.au>
 
        * ld-i386/tlsbin.dd: Adjust for changed sib printing.
diff --git a/ld/testsuite/ld-arm/arm-app-abs32.d b/ld/testsuite/ld-arm/arm-app-abs32.d
new file mode 100644 (file)
index 0000000..4ebff1e
--- /dev/null
@@ -0,0 +1,29 @@
+
+tmpdir/arm-app-abs32:     file format elf32-littlearm
+architecture: arm, flags 0x00000112:
+EXEC_P, HAS_SYMS, D_PAGED
+start address .*
+
+Disassembly of section .plt:
+
+.* <.plt>:
+    .*:        e52de004        str     lr, \[sp, #-4\]!
+    .*:        e59fe004        ldr     lr, \[pc, #4\]  ; .* <.plt\+0x10>
+    .*:        e08fe00e        add     lr, pc, lr
+    .*:        e5bef008        ldr     pc, \[lr, #8\]!
+    .*:        .*      .*
+    .*:        e28fc6.*        add     ip, pc, #.*     ; .*
+    .*:        e28cca.*        add     ip, ip, #.*     ; .*
+    .*:        e5bcf.*         ldr     pc, \[ip, #.*\]!
+Disassembly of section .text:
+
+.* <_start>:
+    .*:        e1a0c00d        mov     ip, sp
+    .*:        e92dd800        stmdb   sp!, {fp, ip, lr, pc}
+    .*:        e59f0004        ldr     r0, \[pc, #4\]  ; .* <.text\+0x14>
+    .*:        e89d6800        ldmia   sp, {fp, sp, lr}
+    .*:        e12fff1e        bx      lr
+    .*:        .*      .*
+
+.* <app_func2>:
+    .*:        e12fff1e        bx      lr
diff --git a/ld/testsuite/ld-arm/arm-app-abs32.r b/ld/testsuite/ld-arm/arm-app-abs32.r
new file mode 100644 (file)
index 0000000..b9e9966
--- /dev/null
@@ -0,0 +1,8 @@
+
+tmpdir/arm-app-abs32:     file format elf32-littlearm
+
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+.* R_ARM_JUMP_SLOT   lib_func1
+
+
diff --git a/ld/testsuite/ld-arm/arm-app-abs32.s b/ld/testsuite/ld-arm/arm-app-abs32.s
new file mode 100644 (file)
index 0000000..a1cf526
--- /dev/null
@@ -0,0 +1,16 @@
+       .text
+       .globl _start
+_start:
+       mov     ip, sp
+       stmdb   sp!, {r11, ip, lr, pc}
+       ldr     a1, .Lval
+       ldmia   sp, {r11, sp, lr}
+       bx      lr
+
+.Lval:
+       .long   lib_func1
+
+       .globl app_func2
+app_func2:
+       bx      lr
+
index 581ebb6292e11dbcc6b4c5518901f638d9698b0c..2f32a11de3424fc7ba77d32e541a3f9d27b7863c 100644 (file)
@@ -44,6 +44,9 @@ set armelftests {
     {"Simple static application" "" "" {arm-static-app.s}
      {{objdump -fdw arm-static-app.d} {objdump -rw arm-static-app.r}}
      "arm-static-app"}
+    {"Non-pcrel function reference" "tmpdir/arm-lib.so" "" {arm-app-abs32.s}
+     {{objdump -fdw arm-app-abs32.d} {objdump -Rw arm-app-abs32.r}}
+     "arm-app-abs32"}
 }
 
 run_ld_link_tests $armelftests