From 2df149a4c0a6ae33b557598845e995c58fd2d884 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 23 Jan 2004 16:51:39 +0000 Subject: [PATCH] * 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. --- ld/testsuite/ChangeLog | 6 ++++++ ld/testsuite/ld-arm/arm-app-abs32.d | 29 +++++++++++++++++++++++++++++ ld/testsuite/ld-arm/arm-app-abs32.r | 8 ++++++++ ld/testsuite/ld-arm/arm-app-abs32.s | 16 ++++++++++++++++ ld/testsuite/ld-arm/arm-elf.exp | 3 +++ 5 files changed, 62 insertions(+) create mode 100644 ld/testsuite/ld-arm/arm-app-abs32.d create mode 100644 ld/testsuite/ld-arm/arm-app-abs32.r create mode 100644 ld/testsuite/ld-arm/arm-app-abs32.s diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 80c5d1eba76..7458855d057 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2004-01-23 Daniel Jacobowitz + + * 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 * 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 index 00000000000..4ebff1e838a --- /dev/null +++ b/ld/testsuite/ld-arm/arm-app-abs32.d @@ -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 + .*: .* .* + +.* : + .*: 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 index 00000000000..b9e99661ea0 --- /dev/null +++ b/ld/testsuite/ld-arm/arm-app-abs32.r @@ -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 index 00000000000..a1cf52690a7 --- /dev/null +++ b/ld/testsuite/ld-arm/arm-app-abs32.s @@ -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 + diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp index 581ebb6292e..2f32a11de34 100644 --- a/ld/testsuite/ld-arm/arm-elf.exp +++ b/ld/testsuite/ld-arm/arm-elf.exp @@ -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 -- 2.30.2