forked from OSchip/llvm-project
[ARM][test] Improve tests
Delete trailing 2>&1 that is not piped to another command. Add --no-show-raw-insn to objdump -d commands. llvm-svn: 366676
This commit is contained in:
parent
1df6be211e
commit
5d4bc1293c
|
@ -4,7 +4,7 @@
|
|||
// RUN: .callee1 0x100004 : { *(.callee_low) } \
|
||||
// RUN: .caller 0x500000 : { *(.text) } \
|
||||
// RUN: .callee2 0x900004 : { *(.callee_high) } } " > %t.script
|
||||
// RUN: ld.lld %t --script %t.script -o %t2 2>&1
|
||||
// RUN: ld.lld %t --script %t.script -o %t2
|
||||
// RUN: llvm-objdump -d -triple=thumbv6-none-linux-gnueabi %t2 | FileCheck -check-prefix=CHECK-THUMB %s
|
||||
// RUN: llvm-objdump -d -triple=armv6-none-linux-gnueabi %t2 | FileCheck -check-prefix=CHECK-ARM %s
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=armv6-none-linux-gnueabi %s -o %t
|
||||
// RUN: ld.lld %t -o %t2 2>&1
|
||||
// RUN: ld.lld %t -o %t2
|
||||
// RUN: llvm-objdump -d -triple=armv6-none-linux-gnueabi -start-address=69632 -stop-address=69640 %t2 | FileCheck -check-prefix=CHECK-ARM1 %s
|
||||
// RUN: llvm-objdump -d -triple=thumbv6-none-linux-gnueabi %t2 -start-address=69640 -stop-address=69644 | FileCheck -check-prefix=CHECK-THUMB1 %s
|
||||
// RUN: llvm-objdump -d -triple=armv6-none-linux-gnueabi -start-address=2166796 -stop-address=2166804 %t2 | FileCheck -check-prefix=CHECK-ARM2 %s
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// RUN: .caller : { *(.text) } \
|
||||
// RUN: .callee3 : { *(.callee_high) } \
|
||||
// RUN: .callee4 : { *(.callee_arm_high) } } " > %t.script
|
||||
// RUN: ld.lld --script %t.script %t %tfar -o %t2 2>&1
|
||||
// RUN: ld.lld --script %t.script %t %tfar -o %t2
|
||||
// RUN: llvm-objdump -d -triple=armv7a-none-linux-gnueabi %t2 | FileCheck -check-prefix=CHECK-ARM %s
|
||||
// RUN: llvm-objdump -d -triple=thumbv7a-none-linux-gnueabi %t2 | FileCheck -check-prefix=CHECK-THUMB %s
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t
|
||||
// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=armv7a-none-linux-gnueabi %S/Inputs/far-arm-abs.s -o %tfar
|
||||
// RUN: ld.lld %t %tfar -o %t2 2>&1
|
||||
// RUN: ld.lld %t %tfar -o %t2
|
||||
// RUN: llvm-objdump -d -triple=armv7a-none-linux-gnueabi %t2 | FileCheck --check-prefix=SHORT %s
|
||||
// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=armv7a-none-linux-gnueabi %S/Inputs/far-long-arm-abs.s -o %tfarlong
|
||||
// RUN: ld.lld %t %tfarlong -o %t3 2>&1
|
||||
// RUN: ld.lld %t %tfarlong -o %t3
|
||||
// RUN: llvm-objdump -d -triple=armv7a-none-linux-gnueabi %t3 | FileCheck --check-prefix=LONG %s
|
||||
.syntax unified
|
||||
.section .text, "ax",%progbits
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
// RUN: .callee1 : { *(.callee_low) } \
|
||||
// RUN: .caller : { *(.text) } \
|
||||
// RUN: .callee2 : { *(.callee_high) } } " > %t.script
|
||||
// RUN: ld.lld --script %t.script %t %tfar -o %t2 2>&1
|
||||
// RUN: ld.lld --script %t.script %t %tfar -o %t2
|
||||
// RUN: llvm-objdump -d -triple=armv7a-none-linux-gnueabi %t2 | FileCheck %s
|
||||
.syntax unified
|
||||
.section .callee_low, "ax",%progbits
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
// RUN: ld.lld -shared %t2.o -soname fixed-length-string.so -o %t2.so
|
||||
// RUN: ld.lld --hash-style=sysv %t.o %t2.so -o %t3
|
||||
// RUN: llvm-readobj -S -r --expand-relocs --symbols %t3 | FileCheck %s
|
||||
// RUN: llvm-objdump -d -triple=armv7a-none-linux-gnueabi %t3 | FileCheck -check-prefix=CODE %s
|
||||
// RUN: llvm-objdump -d -triple=armv7a-none-linux-gnueabi --no-show-raw-insn %t3 | FileCheck -check-prefix=CODE %s
|
||||
// RUN: llvm-objdump -s -triple=armv7a-none-linux-gnueabi -section=.rodata %t3 | FileCheck -check-prefix=RODATA %s
|
||||
|
||||
// Copy relocations R_ARM_COPY are required for y and z
|
||||
|
@ -69,12 +69,12 @@ _start:
|
|||
// CODE-NEXT: _start:
|
||||
// S(y) = 0x13000, A = 0
|
||||
// (S + A) & 0x0000ffff = 0x3000 = #12288
|
||||
// CODE-NEXT: 11000: 00 20 03 e3 movw r2, #12288
|
||||
// CODE-NEXT: 11000: movw r2, #12288
|
||||
// S(y) = 0x13000, A = 0
|
||||
// ((S + A) & 0xffff0000) >> 16 = 0x1
|
||||
// CODE-NEXT: 11004: 01 20 40 e3 movt r2, #1
|
||||
// CODE-NEXT: 11008: 04 30 9f e5 ldr r3, [pc, #4]
|
||||
// CODE-NEXT: 1100c: 00 30 93 e5 ldr r3, [r3]
|
||||
// CODE-NEXT: 11004: movt r2, #1
|
||||
// CODE-NEXT: 11008: ldr r3, [pc, #4]
|
||||
// CODE-NEXT: 1100c: ldr r3, [r3]
|
||||
|
||||
|
||||
// RODATA: Contents of section .rodata:
|
||||
|
|
|
@ -2,34 +2,30 @@
|
|||
|
||||
// RUN: llvm-mc -filetype=obj -triple=armv7-pc-linux %s -o %t.o
|
||||
// RUN: ld.lld %t.o -o %t.so -shared
|
||||
// RUN: llvm-readelf -l %t.so | FileCheck %s
|
||||
// RUN: llvm-readelf -l %t.so | FileCheck --implicit-check-not=LOAD %s
|
||||
|
||||
// RUN: ld.lld %t.o %t.o -o %t.so -shared
|
||||
// RUN: llvm-readelf -l %t.so | FileCheck %s
|
||||
// RUN: llvm-readelf -l %t.so | FileCheck --implicit-check-not=LOAD %s
|
||||
|
||||
// RUN: echo ".section .foo,\"ax\"; \
|
||||
// RUN: bx lr" > %t.s
|
||||
// RUN: llvm-mc -filetype=obj -triple=armv7-pc-linux %t.s -o %t2.o
|
||||
// RUN: ld.lld %t.o %t2.o -o %t.so -shared
|
||||
// RUN: llvm-readelf -l %t.so | FileCheck --check-prefix=DIFF %s
|
||||
// RUN: llvm-readelf -l %t.so | FileCheck --check-prefix=DIFF --implicit-check-not=LOAD %s
|
||||
|
||||
// CHECK-NOT: LOAD
|
||||
// CHECK: LOAD 0x000000 0x00000000 0x00000000 0x0016d 0x0016d R 0x1000
|
||||
// CHECK: LOAD 0x001000 0x00001000 0x00001000 0x{{.*}} 0x{{.*}} R E 0x1000
|
||||
// CHECK: LOAD 0x002000 0x00002000 0x00002000 0x{{.*}} 0x{{.*}} E 0x1000
|
||||
// CHECK: LOAD 0x003000 0x00003000 0x00003000 0x00038 0x00038 RW 0x1000
|
||||
// CHECK-NOT: LOAD
|
||||
|
||||
// CHECK: 01 .dynsym .gnu.hash .hash .dynstr
|
||||
// CHECK: 02 .text
|
||||
// CHECK: 03 .foo
|
||||
// CHECK: 04 .dynamic
|
||||
|
||||
// DIFF-NOT: LOAD
|
||||
// DIFF: LOAD 0x000000 0x00000000 0x00000000 0x0014d 0x0014d R 0x1000
|
||||
// DIFF: LOAD 0x001000 0x00001000 0x00001000 0x0000c 0x0000c R E 0x1000
|
||||
// DIFF: LOAD 0x002000 0x00002000 0x00002000 0x00038 0x00038 RW 0x1000
|
||||
// DIFF-NOT: LOAD
|
||||
|
||||
// DIFF: 01 .dynsym .gnu.hash .hash .dynstr
|
||||
// DIFF: 02 .text .foo
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -filetype=obj --arm-add-build-attributes -triple=armv7a-none-linux-gnueabi %s -o %t
|
||||
// RUN: ld.lld %t -o %t2
|
||||
// RUN: llvm-objdump -d -triple=armv7a-none-linux-gnueabi %t2 | FileCheck %s
|
||||
// RUN: llvm-objdump -d -triple=armv7a-none-linux-gnueabi --no-show-raw-insn %t2 | FileCheck %s
|
||||
// RUN: llvm-objdump -s -triple=armv7a-none-linux-gnueabi %t2 | FileCheck -check-prefix=CHECK-EXIDX %s
|
||||
// RUN: llvm-readobj --program-headers --sections %t2 | FileCheck -check-prefix=CHECK-PT %s
|
||||
|
||||
|
@ -55,17 +55,17 @@ _start:
|
|||
// CHECK: Disassembly of section .text:
|
||||
// CHECK-EMPTY:
|
||||
// CHECK-NEXT: _start:
|
||||
// CHECK-NEXT: 11000: 01 00 00 eb bl #4 <func1>
|
||||
// CHECK-NEXT: 11004: 01 00 00 eb bl #4 <func2>
|
||||
// CHECK-NEXT: 11008: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 11000: bl #4 <func1>
|
||||
// CHECK-NEXT: 11004: bl #4 <func2>
|
||||
// CHECK-NEXT: 11008: bx lr
|
||||
// CHECK: func1:
|
||||
// CHECK-NEXT: 1100c: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 1100c: bx lr
|
||||
// CHECK: func2:
|
||||
// CHECK-NEXT: 11010: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 11010: bx lr
|
||||
// CHECK: __gxx_personality_v0:
|
||||
// CHECK-NEXT: 11014: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 11014: bx lr
|
||||
// CHECK: __aeabi_unwind_cpp_pr0:
|
||||
// CHECK-NEXT: 11018: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 11018: bx lr
|
||||
|
||||
// 100d4 + f2c = 11000 = main (linker generated cantunwind)
|
||||
// 100dc + f30 = 1100c = func1 (inline unwinding data)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -filetype=obj -triple arm-gnu-linux-eabi -mcpu cortex-a7 -arm-add-build-attributes %s -o %t.o
|
||||
// RUN: echo "ENTRY(__entrypoint) SECTIONS { . = 0x10000; .text : { *(.text .text.*) } /DISCARD/ : { *(.ARM.exidx*) *(.gnu.linkonce.armexidx.*) } }" > %t.script
|
||||
// RUN: ld.lld -T %t.script %t.o -o %t.elf 2>&1
|
||||
// RUN: ld.lld -T %t.script %t.o -o %t.elf
|
||||
// RUN: llvm-readobj --sections %t.elf | FileCheck %s
|
||||
|
||||
.globl __entrypoint
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -filetype=obj --arm-add-build-attributes -triple=armv7a-none-linux-gnueabi %s -o %t
|
||||
// RUN: ld.lld %t --no-merge-exidx-entries -o %t2 --gc-sections 2>&1
|
||||
// RUN: llvm-objdump -d -triple=armv7a-none-linux-gnueabi %t2 | FileCheck %s
|
||||
// RUN: ld.lld %t --no-merge-exidx-entries -o %t2 --gc-sections
|
||||
// RUN: llvm-objdump -d -triple=armv7a-none-linux-gnueabi --no-show-raw-insn %t2 | FileCheck %s
|
||||
// RUN: llvm-objdump -s -triple=armv7a-none-linux-gnueabi %t2 | FileCheck -check-prefix=CHECK-EXIDX %s
|
||||
|
||||
// Test the behavior of .ARM.exidx sections under garbage collection
|
||||
|
@ -93,17 +93,17 @@ _start:
|
|||
// CHECK: Disassembly of section .text:
|
||||
// CHECK-EMPTY:
|
||||
// CHECK-NEXT: _start:
|
||||
// CHECK-NEXT: 11000: 01 00 00 eb bl #4 <func1>
|
||||
// CHECK-NEXT: 11004: 01 00 00 eb bl #4 <func2>
|
||||
// CHECK-NEXT: 11008: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 11000: bl #4 <func1>
|
||||
// CHECK-NEXT: 11004: bl #4 <func2>
|
||||
// CHECK-NEXT: 11008: bx lr
|
||||
// CHECK: func1:
|
||||
// CHECK-NEXT: 1100c: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 1100c: bx lr
|
||||
// CHECK: func2:
|
||||
// CHECK-NEXT: 11010: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 11010: bx lr
|
||||
// CHECK: __gxx_personality_v0:
|
||||
// CHECK-NEXT: 11014: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 11014: bx lr
|
||||
// CHECK: __aeabi_unwind_cpp_pr0:
|
||||
// CHECK-NEXT: 11018: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 11018: bx lr
|
||||
|
||||
// GC should have removed table entries for unusedfunc1, unusedfunc2
|
||||
// and __gxx_personality_v1
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t
|
||||
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %S/Inputs/arm-exidx-cantunwind.s -o %tcantunwind
|
||||
// RUN: ld.lld --no-merge-exidx-entries %t %tcantunwind -o %t2 2>&1
|
||||
// RUN: llvm-objdump -d -triple=armv7a-none-linux-gnueabi %t2 | FileCheck %s
|
||||
// RUN: ld.lld --no-merge-exidx-entries %t %tcantunwind -o %t2
|
||||
// RUN: llvm-objdump -d -triple=armv7a-none-linux-gnueabi --no-show-raw-insn %t2 | FileCheck %s
|
||||
// RUN: llvm-objdump -s -triple=armv7a-none-linux-gnueabi %t2 | FileCheck -check-prefix=CHECK-EXIDX %s
|
||||
// RUN: llvm-readobj --program-headers --sections %t2 | FileCheck -check-prefix=CHECK-PT %s
|
||||
// Use Linker script to place .ARM.exidx in between .text and orphan sections
|
||||
// RUN: echo "SECTIONS { \
|
||||
// RUN: .text 0x11000 : { *(.text*) } \
|
||||
// RUN: .ARM.exidx : { *(.ARM.exidx) } } " > %t.script
|
||||
// RUN: ld.lld --no-merge-exidx-entries --script %t.script %tcantunwind %t -o %t3 2>&1
|
||||
// RUN: ld.lld --no-merge-exidx-entries --script %t.script %tcantunwind %t -o %t3
|
||||
// RUN: llvm-objdump -d -triple=armv7a-none-linux-gnueabi %t3 | FileCheck -check-prefix=CHECK-SCRIPT %s
|
||||
// RUN: llvm-objdump -s -triple=armv7a-none-linux-gnueabi %t3 | FileCheck -check-prefix=CHECK-SCRIPT-EXIDX %s
|
||||
|
||||
|
@ -56,29 +56,29 @@ f3:
|
|||
// CHECK: Disassembly of section .text:
|
||||
// CHECK-EMPTY:
|
||||
// CHECK: _start:
|
||||
// CHECK-NEXT: 11000: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 11000: bx lr
|
||||
// CHECK: f1:
|
||||
// CHECK-NEXT: 11004: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 11004: bx lr
|
||||
// CHECK: f2:
|
||||
// CHECK-NEXT: 11008: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 11008: bx lr
|
||||
// CHECK: f3:
|
||||
// CHECK-NEXT: 1100c: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 1100c: bx lr
|
||||
// CHECK: func4:
|
||||
// CHECK-NEXT: 11010: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 11010: bx lr
|
||||
// CHECK: func5:
|
||||
// CHECK-NEXT: 11014: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 11014: bx lr
|
||||
// CHECK: Disassembly of section .func1:
|
||||
// CHECK-EMPTY:
|
||||
// CHECK-NEXT: func1:
|
||||
// CHECK-NEXT: 11018: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 11018: bx lr
|
||||
// CHECK: Disassembly of section .func2:
|
||||
// CHECK-EMPTY:
|
||||
// CHECK-NEXT: func2:
|
||||
// CHECK-NEXT: 1101c: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 1101c: bx lr
|
||||
// CHECK: Disassembly of section .func3:
|
||||
// CHECK-EMPTY:
|
||||
// CHECK-NEXT: func3:
|
||||
// CHECK-NEXT: 11020: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 11020: bx lr
|
||||
|
||||
// Each .ARM.exidx section has two 4 byte fields
|
||||
// Field 1 is the 31-bit offset to the function. The top bit is used to
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t
|
||||
// RUN: ld.lld %t -o %t2 2>&1
|
||||
// RUN: ld.lld %t -o %t2
|
||||
// RUN: llvm-readobj --sections %t2 | FileCheck %s
|
||||
|
||||
// Check that only a single .ARM.exidx output section is created when
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t
|
||||
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %S/Inputs/arm-exidx-cantunwind.s -o %tcantunwind
|
||||
// Check that relocatable link maintains SHF_LINK_ORDER
|
||||
// RUN: ld.lld -r %t %tcantunwind -o %t4 2>&1
|
||||
// RUN: ld.lld -r %t %tcantunwind -o %t4
|
||||
// RUN: llvm-readobj -S %t4 | FileCheck %s
|
||||
|
||||
// Each assembler created .ARM.exidx section has the SHF_LINK_ORDER flag set
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -filetype=obj -arm-add-build-attributes -triple=armv7a-none-linux-gnueabi %s -o %t
|
||||
// RUN: ld.lld --hash-style=sysv %t --shared -o %t2 2>&1
|
||||
// RUN: ld.lld --hash-style=sysv %t --shared -o %t2
|
||||
// RUN: llvm-readobj --relocations %t2 | FileCheck %s
|
||||
// RUN: llvm-objdump -s -triple=armv7a-none-linux-gnueabi %t2 | FileCheck --check-prefix=CHECK-EXTAB-NEXT %s
|
||||
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
// RUN: echo " .text_low 0x130 : { *(.text) }" >> %t.script
|
||||
// RUN: echo " .text_high 0xf0000000 : AT(0x1000) { *(.text_high) }" >> %t.script
|
||||
// RUN: echo " } " >> %t.script
|
||||
// RUN: ld.lld --script %t.script --pie --static %t -o %t2 2>&1
|
||||
// RUN: llvm-objdump -d -triple=armv7a-none-linux-gnueabi %t2 | FileCheck %s
|
||||
// RUN: ld.lld --script %t.script --pie --static %t -o %t2
|
||||
// RUN: llvm-objdump -d -triple=armv7a-none-linux-gnueabi --no-show-raw-insn %t2 | FileCheck %s
|
||||
|
||||
// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=thumbv7a-none-linux-gnueabi %s -o %t3
|
||||
// RUN: ld.lld --script %t.script --pie %t3 -o %t4 2>&1
|
||||
// RUN: llvm-objdump -d -triple=thumbv7a-none-linux-gnueabi %t4 | FileCheck -check-prefix=CHECK-THUMB %s
|
||||
// RUN: ld.lld --script %t.script --pie %t3 -o %t4
|
||||
// RUN: llvm-objdump -d -triple=thumbv7a-none-linux-gnueabi --no-show-raw-insn %t4 | FileCheck -check-prefix=CHECK-THUMB %s
|
||||
|
||||
// Check that we can create Arm and Thumb v7a Position Independent Thunks that
|
||||
// can span the address space without triggering overflow errors. We use an
|
||||
|
@ -34,53 +34,53 @@ high:
|
|||
// CHECK: Disassembly of section .text_low:
|
||||
// CHECK-EMPTY:
|
||||
// CHECK-NEXT: _start:
|
||||
// CHECK-NEXT: 130: 00 00 00 eb bl #0 <__ARMV7PILongThunk_high>
|
||||
// CHECK-NEXT: 134: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 130: bl #0 <__ARMV7PILongThunk_high>
|
||||
// CHECK-NEXT: 134: bx lr
|
||||
|
||||
// CHECK: __ARMV7PILongThunk_high:
|
||||
// CHECK-NEXT: 138: b8 ce 0f e3 movw r12, #65208
|
||||
// CHECK-NEXT: 13c: ff cf 4e e3 movt r12, #61439
|
||||
// CHECK-NEXT: 138: movw r12, #65208
|
||||
// CHECK-NEXT: 13c: movt r12, #61439
|
||||
// 0x140 + 0xEFFF0000 + 0x0000FEB8 + 8 = 0xf0000000 = high
|
||||
// CHECK-NEXT: 140: 0f c0 8c e0 add r12, r12, pc
|
||||
// CHECK-NEXT: 144: 1c ff 2f e1 bx r12
|
||||
// CHECK-NEXT: 140: add r12, r12, pc
|
||||
// CHECK-NEXT: 144: bx r12
|
||||
|
||||
// CHECK: Disassembly of section .text_high:
|
||||
// CHECK-EMPTY:
|
||||
// CHECK-NEXT: high:
|
||||
// CHECK-NEXT: f0000000: 00 00 00 eb bl #0 <__ARMV7PILongThunk__start>
|
||||
// CHECK-NEXT: f0000004: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: f0000000: bl #0 <__ARMV7PILongThunk__start>
|
||||
// CHECK-NEXT: f0000004: bx lr
|
||||
|
||||
// CHECK: __ARMV7PILongThunk__start:
|
||||
// CHECK-NEXT: f0000008: 18 c1 00 e3 movw r12, #280
|
||||
// CHECK-NEXT: f000000c: 00 c0 41 e3 movt r12, #4096
|
||||
// CHECK-NEXT: f0000008: movw r12, #280
|
||||
// CHECK-NEXT: f000000c: movt r12, #4096
|
||||
// 0xf0000010 + 0x10000000 + 0x0000118 + 8 = bits32(0x100000130),0x130 = _start
|
||||
// CHECK-NEXT: f0000010: 0f c0 8c e0 add r12, r12, pc
|
||||
// CHECK-NEXT: f0000014: 1c ff 2f e1 bx r12
|
||||
// CHECK-NEXT: f0000010: add r12, r12, pc
|
||||
// CHECK-NEXT: f0000014: bx r12
|
||||
|
||||
// Thumbv7a instructions and relocations
|
||||
// CHECK-THUMB: Disassembly of section .text_low:
|
||||
// CHECK-THUMB-EMPTY:
|
||||
// CHECK-THUMB-NEXT: _start:
|
||||
// CHECK-THUMB-NEXT: 130: 00 f0 02 f8 bl #4
|
||||
// CHECK-THUMB-NEXT: 134: 70 47 bx lr
|
||||
// CHECK-THUMB-NEXT: 136: d4 d4 bmi #-88
|
||||
// CHECK-THUMB-NEXT: 130: bl #4
|
||||
// CHECK-THUMB-NEXT: 134: bx lr
|
||||
// CHECK-THUMB-NEXT: 136: bmi #-88
|
||||
|
||||
// CHECK-THUMB: __ThumbV7PILongThunk_high:
|
||||
// CHECK-THUMB-NEXT: 138: 4f f6 bd 6c movw r12, #65213
|
||||
// CHECK-THUMB-NEXT: 13c: ce f6 ff 7c movt r12, #61439
|
||||
// CHECK-THUMB-NEXT: 138: movw r12, #65213
|
||||
// CHECK-THUMB-NEXT: 13c: movt r12, #61439
|
||||
// 0x140 + 0xEFFF0000 + 0x0000FEBD + 4 = 0xf0000001 = high
|
||||
// CHECK-THUMB-NEXT: 140: fc 44 add r12, pc
|
||||
// CHECK-THUMB-NEXT: 142: 60 47 bx r12
|
||||
// CHECK-THUMB-NEXT: 140: add r12, pc
|
||||
// CHECK-THUMB-NEXT: 142: bx r12
|
||||
|
||||
// CHECK-THUMB: Disassembly of section .text_high:
|
||||
// CHECK-THUMB-EMPTY:
|
||||
// CHECK-THUMB-NEXT: high:
|
||||
// CHECK-THUMB-NEXT: f0000000: 00 f0 02 f8 bl #4
|
||||
// CHECK-THUMB-NEXT: f0000004: 70 47 bx lr
|
||||
// CHECK-THUMB-NEXT: f0000000: bl #4
|
||||
// CHECK-THUMB-NEXT: f0000004: bx lr
|
||||
|
||||
// CHECK-THUMB: __ThumbV7PILongThunk__start:
|
||||
// CHECK-THUMB-NEXT: f0000008: 40 f2 1d 1c movw r12, #285
|
||||
// CHECK-THUMB-NEXT: f000000c: c1 f2 00 0c movt r12, #4096
|
||||
// CHECK-THUMB-NEXT: f0000008: movw r12, #285
|
||||
// CHECK-THUMB-NEXT: f000000c: movt r12, #4096
|
||||
// 0xf0000010 + 0x10000000 + 0x000011d +4 = bits32(0x100000131),0x131 = _start
|
||||
// CHECK-THUMB-NEXT: f0000010: fc 44 add r12, pc
|
||||
// CHECK-THUMB-NEXT: f0000012: 60 47 bx r12
|
||||
// CHECK-THUMB-NEXT: f0000010: add r12, pc
|
||||
// CHECK-THUMB-NEXT: f0000012: bx r12
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// RUN: .text_low : { *(.text_low) *(.text_low2) } \
|
||||
// RUN: .text_high 0x2000000 : { *(.text_high) *(.text_high2) } \
|
||||
// RUN: } " > %t.script
|
||||
// RUN: ld.lld --pic-veneer --script %t.script %t -o %t2 2>&1
|
||||
// RUN: ld.lld --pic-veneer --script %t.script %t -o %t2
|
||||
// RUN: llvm-objdump -d -triple=thumbv7a-none-linux-gnueabi %t2 | FileCheck %s
|
||||
|
||||
// Test that we can force generation of position independent thunks even when
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// RUN: ld.lld %t1.o --shared -o %t.so
|
||||
// RUN: llvm-mc -filetype=obj -triple=armv7a-linux-gnueabihf %s -o %t.o
|
||||
// RUN: ld.lld --hash-style=sysv %t.so %t.o -o %tout
|
||||
// RUN: llvm-objdump -triple=armv7a-linux-gnueabihf -d %tout | FileCheck %s --check-prefix=DISASM
|
||||
// RUN: llvm-objdump -triple=armv7a-linux-gnueabihf -d --no-show-raw-insn %tout | FileCheck %s --check-prefix=DISASM
|
||||
// RUN: llvm-objdump -s %tout | FileCheck %s --check-prefix=GOTPLT
|
||||
// RUN: llvm-readobj -r --dynamic-table %tout | FileCheck %s
|
||||
|
||||
|
@ -31,52 +31,52 @@
|
|||
// DISASM: Disassembly of section .text:
|
||||
// DISASM-EMPTY:
|
||||
// DISASM-NEXT: foo:
|
||||
// DISASM-NEXT: 11000: 1e ff 2f e1 bx lr
|
||||
// DISASM-NEXT: 11000: bx lr
|
||||
// DISASM: bar:
|
||||
// DISASM-NEXT: 11004: 1e ff 2f e1 bx lr
|
||||
// DISASM-NEXT: 11004: bx lr
|
||||
// DISASM: _start:
|
||||
// DISASM-NEXT: 11008: 14 00 00 eb bl #80
|
||||
// DISASM-NEXT: 1100c: 17 00 00 eb bl #92
|
||||
// DISASM-NEXT: 11008: bl #80
|
||||
// DISASM-NEXT: 1100c: bl #92
|
||||
// DISASM: $d.1:
|
||||
// DISASM-NEXT: 11010: 00 00 00 00 .word 0x00000000
|
||||
// DISASM-NEXT: 11014: 04 00 00 00 .word 0x00000004
|
||||
// DISASM: 11018: 08 00 00 eb bl #32
|
||||
// DISASM-NEXT: 1101c: 0b 00 00 eb bl #44
|
||||
// DISASM: 11018: bl #32
|
||||
// DISASM-NEXT: 1101c: bl #44
|
||||
// DISASM-EMPTY:
|
||||
// DISASM-NEXT: Disassembly of section .plt:
|
||||
// DISASM-EMPTY:
|
||||
// DISASM-NEXT: $a:
|
||||
// DISASM-NEXT: 11020: 04 e0 2d e5 str lr, [sp, #-4]!
|
||||
// DISASM-NEXT: 11024: 00 e6 8f e2 add lr, pc, #0, #12
|
||||
// DISASM-NEXT: 11028: 01 ea 8e e2 add lr, lr, #4096
|
||||
// DISASM-NEXT: 1102c: dc ff be e5 ldr pc, [lr, #4060]!
|
||||
// DISASM-NEXT: 11020: str lr, [sp, #-4]!
|
||||
// DISASM-NEXT: 11024: add lr, pc, #0, #12
|
||||
// DISASM-NEXT: 11028: add lr, lr, #4096
|
||||
// DISASM-NEXT: 1102c: ldr pc, [lr, #4060]!
|
||||
// DISASM: $d:
|
||||
// DISASM-NEXT: 11030: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// DISASM-NEXT: 11034: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// DISASM-NEXT: 11038: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// DISASM-NEXT: 1103c: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// DISASM: $a:
|
||||
// DISASM-NEXT: 11040: 00 c6 8f e2 add r12, pc, #0, #12
|
||||
// DISASM-NEXT: 11044: 01 ca 8c e2 add r12, r12, #4096
|
||||
// DISASM-NEXT: 11048: c4 ff bc e5 ldr pc, [r12, #4036]!
|
||||
// DISASM-NEXT: 11040: add r12, pc, #0, #12
|
||||
// DISASM-NEXT: 11044: add r12, r12, #4096
|
||||
// DISASM-NEXT: 11048: ldr pc, [r12, #4036]!
|
||||
// DISASM: $d:
|
||||
// DISASM-NEXT: 1104c: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// DISASM: $a:
|
||||
// DISASM-NEXT: 11050: 00 c6 8f e2 add r12, pc, #0, #12
|
||||
// DISASM-NEXT: 11054: 01 ca 8c e2 add r12, r12, #4096
|
||||
// DISASM-NEXT: 11058: b8 ff bc e5 ldr pc, [r12, #4024]!
|
||||
// DISASM-NEXT: 11050: add r12, pc, #0, #12
|
||||
// DISASM-NEXT: 11054: add r12, r12, #4096
|
||||
// DISASM-NEXT: 11058: ldr pc, [r12, #4024]!
|
||||
// DISASM: $d:
|
||||
// DISASM-NEXT: 1105c: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// DISASM: $a:
|
||||
// DISASM-NEXT: 11060: 00 c6 8f e2 add r12, pc, #0, #12
|
||||
// DISASM-NEXT: 11064: 01 ca 8c e2 add r12, r12, #4096
|
||||
// DISASM-NEXT: 11068: 18 f0 bc e5 ldr pc, [r12, #24]!
|
||||
// DISASM-NEXT: 11060: add r12, pc, #0, #12
|
||||
// DISASM-NEXT: 11064: add r12, r12, #4096
|
||||
// DISASM-NEXT: 11068: ldr pc, [r12, #24]!
|
||||
// DISASM: $d:
|
||||
// DISASM-NEXT: 1106c: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// DISASM: $a:
|
||||
// DISASM-NEXT: 11070: 00 c6 8f e2 add r12, pc, #0, #12
|
||||
// DISASM-NEXT: 11074: 01 ca 8c e2 add r12, r12, #4096
|
||||
// DISASM-NEXT: 11078: 0c f0 bc e5 ldr pc, [r12, #12]!
|
||||
// DISASM-NEXT: 11070: add r12, pc, #0, #12
|
||||
// DISASM-NEXT: 11074: add r12, r12, #4096
|
||||
// DISASM-NEXT: 11078: ldr pc, [r12, #12]!
|
||||
// DISASM: $d:
|
||||
// DISASM-NEXT: 1107c: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o
|
||||
// RUN: ld.lld -static %t.o -o %tout
|
||||
// RUN: llvm-objdump -triple armv7a-none-linux-gnueabi -d %tout | FileCheck %s --check-prefix=DISASM
|
||||
// RUN: llvm-readobj -r --symbols --sections %tout | FileCheck %s
|
||||
// RUN: ld.lld %t.o -o %t
|
||||
// RUN: llvm-objdump -triple armv7a-none-linux-gnueabi -d --no-show-raw-insn %t | FileCheck %s --check-prefix=DISASM
|
||||
// RUN: llvm-readobj -r --symbols --sections %t | FileCheck %s
|
||||
.syntax unified
|
||||
.text
|
||||
.type foo STT_GNU_IFUNC
|
||||
|
@ -115,31 +115,31 @@ _start:
|
|||
// DISASM: Disassembly of section .text:
|
||||
// DISASM-EMPTY:
|
||||
// DISASM-NEXT: foo:
|
||||
// DISASM-NEXT: 11000: 1e ff 2f e1 bx lr
|
||||
// DISASM-NEXT: 11000: bx lr
|
||||
// DISASM: bar:
|
||||
// DISASM-NEXT: 11004: 1e ff 2f e1 bx lr
|
||||
// DISASM-NEXT: 11004: bx lr
|
||||
// DISASM: _start:
|
||||
// DISASM-NEXT: 11008: 04 00 00 eb bl #16
|
||||
// DISASM-NEXT: 1100c: 07 00 00 eb bl #28
|
||||
// DISASM-NEXT: 11008: bl #16
|
||||
// DISASM-NEXT: 1100c: bl #28
|
||||
// 1 * 65536 + 244 = 0x100f4 __rel_iplt_start
|
||||
// DISASM-NEXT: 11010: f4 00 00 e3 movw r0, #244
|
||||
// DISASM-NEXT: 11014: 01 00 40 e3 movt r0, #1
|
||||
// DISASM-NEXT: 11010: movw r0, #244
|
||||
// DISASM-NEXT: 11014: movt r0, #1
|
||||
// 1 * 65536 + 260 = 0x10104 __rel_iplt_end
|
||||
// DISASM-NEXT: 11018: 04 01 00 e3 movw r0, #260
|
||||
// DISASM-NEXT: 1101c: 01 00 40 e3 movt r0, #1
|
||||
// DISASM-NEXT: 11018: movw r0, #260
|
||||
// DISASM-NEXT: 1101c: movt r0, #1
|
||||
// DISASM-EMPTY:
|
||||
// DISASM-NEXT: Disassembly of section .plt:
|
||||
// DISASM-EMPTY:
|
||||
// DISASM-NEXT: $a:
|
||||
// DISASM-NEXT: 11020: 00 c6 8f e2 add r12, pc, #0, #12
|
||||
// DISASM-NEXT: 11024: 00 ca 8c e2 add r12, r12, #0, #20
|
||||
// DISASM-NEXT: 11028: d8 ff bc e5 ldr pc, [r12, #4056]!
|
||||
// DISASM-NEXT: 11020: add r12, pc, #0, #12
|
||||
// DISASM-NEXT: 11024: add r12, r12, #0, #20
|
||||
// DISASM-NEXT: 11028: ldr pc, [r12, #4056]!
|
||||
// DISASM: $d:
|
||||
// DISASM-NEXT: 1102c: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// DISASM: $a:
|
||||
// DISASM-NEXT: 11030: 00 c6 8f e2 add r12, pc, #0, #12
|
||||
// DISASM-NEXT: 11034: 00 ca 8c e2 add r12, r12, #0, #20
|
||||
// DISASM-NEXT: 11038: cc ff bc e5 ldr pc, [r12, #4044]!
|
||||
// DISASM-NEXT: 11030: add r12, pc, #0, #12
|
||||
// DISASM-NEXT: 11034: add r12, r12, #0, #20
|
||||
// DISASM-NEXT: 11038: ldr pc, [r12, #4044]!
|
||||
// DISASM: $d:
|
||||
// DISASM-NEXT: 1103c: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -filetype=obj -triple=armv7a-unknown-linux-gnueabi %s -o %t
|
||||
// RUN: ld.lld %t -o %t2
|
||||
// RUN: llvm-objdump -d %t2 -triple=armv7a-unknown-linux-gnueabi | FileCheck %s
|
||||
// RUN: llvm-objdump -d %t2 -triple=armv7a-unknown-linux-gnueabi --no-show-raw-insn | FileCheck %s
|
||||
// RUN: llvm-mc -filetype=obj -triple=thumbv7a-unknown-linux-gnueabi %s -o %t3
|
||||
// RUN: ld.lld %t3 -o %t4
|
||||
// RUN: llvm-objdump -d %t4 -triple=thumbv7a-unknown-linux-gnueabi | FileCheck %s
|
||||
// RUN: llvm-objdump -d %t4 -triple=thumbv7a-unknown-linux-gnueabi --no-show-raw-insn | FileCheck %s
|
||||
|
||||
// Test the R_ARM_MOVW_ABS_NC and R_ARM_MOVT_ABS relocations as well as
|
||||
// the R_ARM_THM_MOVW_ABS_NC and R_ARM_THM_MOVT_ABS relocations.
|
||||
|
@ -45,15 +45,15 @@ _start:
|
|||
movw r3, :lower16:label3 - .
|
||||
movw r4, :lower16:label3 + 0x103c - .
|
||||
// 0x20000 - 0x11028 = :lower16:0xefd8 (61400)
|
||||
// CHECK: 11028: {{.*}} movw r0, #61400
|
||||
// CHECK: 11028: movw r0, #61400
|
||||
// 0x20004 = 0x1102c = :lower16:0xefd8 (61400)
|
||||
// CHECK: 1102c: {{.*}} movw r1, #61400
|
||||
// CHECK: 1102c: movw r1, #61400
|
||||
// 0x20008 - 0x11030 + 4 = :lower16:0xefdc (61404)
|
||||
// CHECK: 11030: {{.*}} movw r2, #61404
|
||||
// CHECK: 11030: movw r2, #61404
|
||||
// 0x2fffc - 0x11034 = :lower16:0x1efc8 (61384)
|
||||
// CHECK: 11034: {{.*}} movw r3, #61384
|
||||
// CHECK: 11034: movw r3, #61384
|
||||
// 0x2fffc - 0x11038 +0x103c :lower16:0x20000 (0)
|
||||
// CHECK: 11038: {{.*}} movw r4, #0
|
||||
// CHECK: 11038: movw r4, #0
|
||||
|
||||
.section .R_ARM_MOVT_PREL, "ax",%progbits
|
||||
movt r0, :upper16:label - .
|
||||
|
@ -62,15 +62,15 @@ _start:
|
|||
movt r3, :upper16:label3 - .
|
||||
movt r4, :upper16:label3 + 0x1050 - .
|
||||
// 0x20000 - 0x1103c = :upper16:0xefc4 = 0
|
||||
// CHECK: 1103c: {{.*}} movt r0, #0
|
||||
// CHECK: 1103c: movt r0, #0
|
||||
// 0x20004 - 0x11040 = :upper16:0xefc0 = 0
|
||||
// CHECK: 11040: {{.*}} movt r1, #0
|
||||
// CHECK: 11040: movt r1, #0
|
||||
// 0x20008 - 0x11044 + 4 = :upper16:0xefc8 = 0
|
||||
// CHECK: 11044: {{.*}} movt r2, #0
|
||||
// CHECK: 11044: movt r2, #0
|
||||
// 0x2fffc - 0x11048 = :upper16:0x1efb4 = 1
|
||||
// CHECK: 11048: {{.*}} movt r3, #1
|
||||
// CHECK: 11048: movt r3, #1
|
||||
// 0x2fffc - 0x1104c + 0x1050 = :upper16:0x20000 = 2
|
||||
// CHECK: 1104c: {{.*}} movt r4, #2
|
||||
// CHECK: 1104c: movt r4, #2
|
||||
.section .destination, "aw",%progbits
|
||||
.balign 65536
|
||||
// 0x20000
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %p/Inputs/arm-plt-reloc.s -o %t1
|
||||
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t2
|
||||
// RUN: ld.lld %t1 %t2 -o %t
|
||||
// RUN: llvm-objdump -triple=armv7a-none-linux-gnueabi -d %t | FileCheck %s
|
||||
// RUN: llvm-objdump -triple=armv7a-none-linux-gnueabi -d --no-show-raw-insn %t | FileCheck %s
|
||||
// RUN: ld.lld --hash-style=sysv -shared %t1 %t2 -o %t3
|
||||
// RUN: llvm-objdump -triple=armv7a-none-linux-gnueabi -d %t3 | FileCheck -check-prefix=DSO %s
|
||||
// RUN: llvm-objdump -triple=armv7a-none-linux-gnueabi -d --no-show-raw-insn %t3 | FileCheck -check-prefix=DSO %s
|
||||
// RUN: llvm-readobj -S -r %t3 | FileCheck -check-prefix=DSOREL %s
|
||||
//
|
||||
// Test PLT entry generation
|
||||
|
@ -22,42 +22,42 @@ _start:
|
|||
// CHECK: Disassembly of section .text:
|
||||
// CHECK-EMPTY:
|
||||
// CHECK-NEXT: func1:
|
||||
// CHECK-NEXT: 11000: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 11000: bx lr
|
||||
// CHECK: func2:
|
||||
// CHECK-NEXT: 11004: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 11004: bx lr
|
||||
// CHECK: func3:
|
||||
// CHECK-NEXT: 11008: 1e ff 2f e1 bx lr
|
||||
// CHECK-NEXT: 11008: bx lr
|
||||
// CHECK: _start:
|
||||
// CHECK-NEXT: 1100c: fb ff ff ea b #-20 <func1>
|
||||
// CHECK-NEXT: 11010: fb ff ff eb bl #-20 <func2>
|
||||
// CHECK-NEXT: 11014: fb ff ff 0a beq #-20 <func3>
|
||||
// CHECK-NEXT: 1100c: b #-20 <func1>
|
||||
// CHECK-NEXT: 11010: bl #-20 <func2>
|
||||
// CHECK-NEXT: 11014: beq #-20 <func3>
|
||||
|
||||
// Expect PLT entries as symbols can be preempted
|
||||
// The .got.plt and .plt displacement is small so we can use small PLT entries.
|
||||
// DSO: Disassembly of section .text:
|
||||
// DSO-EMPTY:
|
||||
// DSO-NEXT: func1:
|
||||
// DSO-NEXT: 1000: 1e ff 2f e1 bx lr
|
||||
// DSO-NEXT: 1000: bx lr
|
||||
// DSO: func2:
|
||||
// DSO-NEXT: 1004: 1e ff 2f e1 bx lr
|
||||
// DSO-NEXT: 1004: bx lr
|
||||
// DSO: func3:
|
||||
// DSO-NEXT: 1008: 1e ff 2f e1 bx lr
|
||||
// DSO-NEXT: 1008: bx lr
|
||||
// DSO: _start:
|
||||
// S(0x1040) - P(0x100c) + A(-8) = 0x2c = 32
|
||||
// DSO-NEXT: 100c: 0b 00 00 ea b #44
|
||||
// DSO-NEXT: 100c: b #44
|
||||
// S(0x1050) - P(0x1010) + A(-8) = 0x38 = 56
|
||||
// DSO-NEXT: 1010: 0e 00 00 eb bl #56
|
||||
// DSO-NEXT: 1010: bl #56
|
||||
// S(0x10160) - P(0x1014) + A(-8) = 0x44 = 68
|
||||
// DSO-NEXT: 1014: 11 00 00 0a beq #68
|
||||
// DSO-NEXT: 1014: beq #68
|
||||
// DSO-EMPTY:
|
||||
// DSO-NEXT: Disassembly of section .plt:
|
||||
// DSO-EMPTY:
|
||||
// DSO-NEXT: $a:
|
||||
// DSO-NEXT: 1020: 04 e0 2d e5 str lr, [sp, #-4]!
|
||||
// DSO-NEXT: 1020: str lr, [sp, #-4]!
|
||||
// (0x1024 + 8) + (0 RoR 12) + 4096 + (0xfdc) = 0x3008 = .got.plt[3]
|
||||
// DSO-NEXT: 1024: 00 e6 8f e2 add lr, pc, #0, #12
|
||||
// DSO-NEXT: 1028: 01 ea 8e e2 add lr, lr, #4096
|
||||
// DSO-NEXT: 102c: dc ff be e5 ldr pc, [lr, #4060]!
|
||||
// DSO-NEXT: 1024: add lr, pc, #0, #12
|
||||
// DSO-NEXT: 1028: add lr, lr, #4096
|
||||
// DSO-NEXT: 102c: ldr pc, [lr, #4060]!
|
||||
// DSO: $d:
|
||||
// DSO-NEXT: 1030: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// DSO-NEXT: 1034: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
|
@ -65,23 +65,23 @@ _start:
|
|||
// DSO-NEXT: 103c: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// DSO: $a:
|
||||
// (0x1040 + 8) + (0 RoR 12) + 4096 + (0xfc4) = 0x300c
|
||||
// DSO-NEXT: 1040: 00 c6 8f e2 add r12, pc, #0, #12
|
||||
// DSO-NEXT: 1044: 01 ca 8c e2 add r12, r12, #4096
|
||||
// DSO-NEXT: 1048: c4 ff bc e5 ldr pc, [r12, #4036]!
|
||||
// DSO-NEXT: 1040: add r12, pc, #0, #12
|
||||
// DSO-NEXT: 1044: add r12, r12, #4096
|
||||
// DSO-NEXT: 1048: ldr pc, [r12, #4036]!
|
||||
// DSO: $d:
|
||||
// DSO-NEXT: 104c: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// DSO: $a:
|
||||
// (0x1050 + 8) + (0 RoR 12) + 4096 + (0xfb8) = 0x3010
|
||||
// DSO-NEXT: 1050: 00 c6 8f e2 add r12, pc, #0, #12
|
||||
// DSO-NEXT: 1054: 01 ca 8c e2 add r12, r12, #4096
|
||||
// DSO-NEXT: 1058: b8 ff bc e5 ldr pc, [r12, #4024]!
|
||||
// DSO-NEXT: 1050: add r12, pc, #0, #12
|
||||
// DSO-NEXT: 1054: add r12, r12, #4096
|
||||
// DSO-NEXT: 1058: ldr pc, [r12, #4024]!
|
||||
// DSO: $d:
|
||||
// DSO-NEXT: 105c: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// DSO: $a:
|
||||
// (0x1060 + 8) + (0 RoR 12) + 4096 + (0xfac) = 0x3014
|
||||
// DSO-NEXT: 1060: 00 c6 8f e2 add r12, pc, #0, #12
|
||||
// DSO-NEXT: 1064: 01 ca 8c e2 add r12, r12, #4096
|
||||
// DSO-NEXT: 1068: ac ff bc e5 ldr pc, [r12, #4012]!
|
||||
// DSO-NEXT: 1060: add r12, pc, #0, #12
|
||||
// DSO-NEXT: 1064: add r12, r12, #4096
|
||||
// DSO-NEXT: 1068: ldr pc, [r12, #4012]!
|
||||
// DSO: $d:
|
||||
// DSO-NEXT: 106c: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
|
||||
|
@ -114,50 +114,50 @@ _start:
|
|||
// RUN: .got.plt 0x1100000 : { *(.got.plt) } \
|
||||
// RUN: }" > %t.script
|
||||
// RUN: ld.lld --hash-style=sysv --script %t.script -shared %t1 %t2 -o %t4
|
||||
// RUN: llvm-objdump -triple=armv7a-none-linux-gnueabi -d %t4 | FileCheck --check-prefix=CHECKHIGH %s
|
||||
// RUN: llvm-objdump -triple=armv7a-none-linux-gnueabi -d --no-show-raw-insn %t4 | FileCheck --check-prefix=CHECKHIGH %s
|
||||
// RUN: llvm-readobj -S -r %t4 | FileCheck --check-prefix=DSORELHIGH %s
|
||||
|
||||
// CHECKHIGH: Disassembly of section .text:
|
||||
// CHECKHIGH-EMPTY:
|
||||
// CHECKHIGH-NEXT: func1:
|
||||
// CHECKHIGH-NEXT: 1000: 1e ff 2f e1 bx lr
|
||||
// CHECKHIGH-NEXT: 1000: bx lr
|
||||
// CHECKHIGH: func2:
|
||||
// CHECKHIGH-NEXT: 1004: 1e ff 2f e1 bx lr
|
||||
// CHECKHIGH-NEXT: 1004: bx lr
|
||||
// CHECKHIGH: func3:
|
||||
// CHECKHIGH-NEXT: 1008: 1e ff 2f e1 bx lr
|
||||
// CHECKHIGH-NEXT: 1008: bx lr
|
||||
// CHECKHIGH: _start:
|
||||
// CHECKHIGH-NEXT: 100c: 03 04 00 ea b #4108 <$a>
|
||||
// CHECKHIGH-NEXT: 1010: 06 04 00 eb bl #4120 <$a>
|
||||
// CHECKHIGH-NEXT: 1014: 09 04 00 0a beq #4132 <$a>
|
||||
// CHECKHIGH-NEXT: 100c: b #4108 <$a>
|
||||
// CHECKHIGH-NEXT: 1010: bl #4120 <$a>
|
||||
// CHECKHIGH-NEXT: 1014: beq #4132 <$a>
|
||||
// CHECKHIGH-EMPTY:
|
||||
// CHECKHIGH-NEXT: Disassembly of section .plt:
|
||||
// CHECKHIGH-EMPTY:
|
||||
// CHECKHIGH-NEXT: $a:
|
||||
// CHECKHIGH-NEXT: 2000: 04 e0 2d e5 str lr, [sp, #-4]!
|
||||
// CHECKHIGH-NEXT: 2004: 10 e6 8f e2 add lr, pc, #16, #12
|
||||
// CHECKHIGH-NEXT: 2008: fd ea 8e e2 add lr, lr, #1036288
|
||||
// CHECKHIGH-NEXT: 200c: fc ff be e5 ldr pc, [lr, #4092]!
|
||||
// CHECKHIGH-NEXT: 2000: str lr, [sp, #-4]!
|
||||
// CHECKHIGH-NEXT: 2004: add lr, pc, #16, #12
|
||||
// CHECKHIGH-NEXT: 2008: add lr, lr, #1036288
|
||||
// CHECKHIGH-NEXT: 200c: ldr pc, [lr, #4092]!
|
||||
// CHECKHIGH: $d:
|
||||
// CHECKHIGH-NEXT: 2010: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// CHECKHIGH-NEXT: 2014: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// CHECKHIGH-NEXT: 2018: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// CHECKHIGH-NEXT: 201c: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// CHECKHIGH: $a:
|
||||
// CHECKHIGH-NEXT: 2020: 10 c6 8f e2 add r12, pc, #16, #12
|
||||
// CHECKHIGH-NEXT: 2024: fd ca 8c e2 add r12, r12, #1036288
|
||||
// CHECKHIGH-NEXT: 2028: e4 ff bc e5 ldr pc, [r12, #4068]!
|
||||
// CHECKHIGH-NEXT: 2020: add r12, pc, #16, #12
|
||||
// CHECKHIGH-NEXT: 2024: add r12, r12, #1036288
|
||||
// CHECKHIGH-NEXT: 2028: ldr pc, [r12, #4068]!
|
||||
// CHECKHIGH: $d:
|
||||
// CHECKHIGH-NEXT: 202c: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// CHECKHIGH: $a:
|
||||
// CHECKHIGH-NEXT: 2030: 10 c6 8f e2 add r12, pc, #16, #12
|
||||
// CHECKHIGH-NEXT: 2034: fd ca 8c e2 add r12, r12, #1036288
|
||||
// CHECKHIGH-NEXT: 2038: d8 ff bc e5 ldr pc, [r12, #4056]!
|
||||
// CHECKHIGH-NEXT: 2030: add r12, pc, #16, #12
|
||||
// CHECKHIGH-NEXT: 2034: add r12, r12, #1036288
|
||||
// CHECKHIGH-NEXT: 2038: ldr pc, [r12, #4056]!
|
||||
// CHECKHIGH: $d:
|
||||
// CHECKHIGH-NEXT: 203c: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// CHECKHIGH: $a:
|
||||
// CHECKHIGH-NEXT: 2040: 10 c6 8f e2 add r12, pc, #16, #12
|
||||
// CHECKHIGH-NEXT: 2044: fd ca 8c e2 add r12, r12, #1036288
|
||||
// CHECKHIGH-NEXT: 2048: cc ff bc e5 ldr pc, [r12, #4044]!
|
||||
// CHECKHIGH-NEXT: 2040: add r12, pc, #16, #12
|
||||
// CHECKHIGH-NEXT: 2044: add r12, r12, #1036288
|
||||
// CHECKHIGH-NEXT: 2048: ldr pc, [r12, #4044]!
|
||||
// CHECKHIGH: $d:
|
||||
// CHECKHIGH-NEXT: 204c: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
|
||||
|
@ -182,50 +182,50 @@ _start:
|
|||
// RUN: .got.plt 0x11111100 : { *(.got.plt) } \
|
||||
// RUN: }" > %t2.script
|
||||
// RUN: ld.lld --hash-style=sysv --script %t2.script -shared %t1 %t2 -o %t5
|
||||
// RUN: llvm-objdump -triple=armv7a-none-linux-gnueabi -d %t5 | FileCheck --check-prefix=CHECKLONG %s
|
||||
// RUN: llvm-objdump -triple=armv7a-none-linux-gnueabi -d --no-show-raw-insn %t5 | FileCheck --check-prefix=CHECKLONG %s
|
||||
// RUN: llvm-readobj -S -r %t5 | FileCheck --check-prefix=DSORELLONG %s
|
||||
|
||||
// CHECKLONG: Disassembly of section .text:
|
||||
// CHECKLONG-EMPTY:
|
||||
// CHECKLONG-NEXT: func1:
|
||||
// CHECKLONG-NEXT: 1000: 1e ff 2f e1 bx lr
|
||||
// CHECKLONG-NEXT: 1000: bx lr
|
||||
// CHECKLONG: func2:
|
||||
// CHECKLONG-NEXT: 1004: 1e ff 2f e1 bx lr
|
||||
// CHECKLONG-NEXT: 1004: bx lr
|
||||
// CHECKLONG: func3:
|
||||
// CHECKLONG-NEXT: 1008: 1e ff 2f e1 bx lr
|
||||
// CHECKLONG-NEXT: 1008: bx lr
|
||||
// CHECKLONG: _start:
|
||||
// CHECKLONG-NEXT: 100c: 03 04 00 ea b #4108 <$a>
|
||||
// CHECKLONG-NEXT: 1010: 06 04 00 eb bl #4120 <$a>
|
||||
// CHECKLONG-NEXT: 1014: 09 04 00 0a beq #4132 <$a>
|
||||
// CHECKLONG-NEXT: 100c: b #4108 <$a>
|
||||
// CHECKLONG-NEXT: 1010: bl #4120 <$a>
|
||||
// CHECKLONG-NEXT: 1014: beq #4132 <$a>
|
||||
// CHECKLONG-EMPTY:
|
||||
// CHECKLONG-NEXT: Disassembly of section .plt:
|
||||
// CHECKLONG-EMPTY:
|
||||
// CHECKLONG-NEXT: $a:
|
||||
// CHECKLONG-NEXT: 2000: 04 e0 2d e5 str lr, [sp, #-4]!
|
||||
// CHECKLONG-NEXT: 2004: 04 e0 9f e5 ldr lr, [pc, #4]
|
||||
// CHECKLONG-NEXT: 2008: 0e e0 8f e0 add lr, pc, lr
|
||||
// CHECKLONG-NEXT: 200c: 08 f0 be e5 ldr pc, [lr, #8]!
|
||||
// CHECKLONG-NEXT: 2000: str lr, [sp, #-4]!
|
||||
// CHECKLONG-NEXT: 2004: ldr lr, [pc, #4]
|
||||
// CHECKLONG-NEXT: 2008: add lr, pc, lr
|
||||
// CHECKLONG-NEXT: 200c: ldr pc, [lr, #8]!
|
||||
// CHECKLONG: $d:
|
||||
// CHECKLONG-NEXT: 2010: f0 f0 10 11 .word 0x1110f0f0
|
||||
// CHECKLONG-NEXT: 2014: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// CHECKLONG-NEXT: 2018: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// CHECKLONG-NEXT: 201c: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// CHECKLONG: $a:
|
||||
// CHECKLONG-NEXT: 2020: 04 c0 9f e5 ldr r12, [pc, #4]
|
||||
// CHECKLONG-NEXT: 2024: 0f c0 8c e0 add r12, r12, pc
|
||||
// CHECKLONG-NEXT: 2028: 00 f0 9c e5 ldr pc, [r12]
|
||||
// CHECKLONG-NEXT: 2020: ldr r12, [pc, #4]
|
||||
// CHECKLONG-NEXT: 2024: add r12, r12, pc
|
||||
// CHECKLONG-NEXT: 2028: ldr pc, [r12]
|
||||
// CHECKLONG: $d:
|
||||
// CHECKLONG-NEXT: 202c: e0 f0 10 11 .word 0x1110f0e0
|
||||
// CHECKLONG: $a:
|
||||
// CHECKLONG-NEXT: 2030: 04 c0 9f e5 ldr r12, [pc, #4]
|
||||
// CHECKLONG-NEXT: 2034: 0f c0 8c e0 add r12, r12, pc
|
||||
// CHECKLONG-NEXT: 2038: 00 f0 9c e5 ldr pc, [r12]
|
||||
// CHECKLONG-NEXT: 2030: ldr r12, [pc, #4]
|
||||
// CHECKLONG-NEXT: 2034: add r12, r12, pc
|
||||
// CHECKLONG-NEXT: 2038: ldr pc, [r12]
|
||||
// CHECKLONG: $d:
|
||||
// CHECKLONG-NEXT: 203c: d4 f0 10 11 .word 0x1110f0d4
|
||||
// CHECKLONG: $a:
|
||||
// CHECKLONG-NEXT: 2040: 04 c0 9f e5 ldr r12, [pc, #4]
|
||||
// CHECKLONG-NEXT: 2044: 0f c0 8c e0 add r12, r12, pc
|
||||
// CHECKLONG-NEXT: 2048: 00 f0 9c e5 ldr pc, [r12]
|
||||
// CHECKLONG-NEXT: 2040: ldr r12, [pc, #4]
|
||||
// CHECKLONG-NEXT: 2044: add r12, r12, pc
|
||||
// CHECKLONG-NEXT: 2048: ldr pc, [r12]
|
||||
// CHECKLONG: $d:
|
||||
// CHECKLONG-NEXT: 204c: c8 f0 10 11 .word 0x1110f0c8
|
||||
|
||||
|
@ -251,50 +251,50 @@ _start:
|
|||
// RUN: .got.plt 0x8002020 : { *(.got.plt) } \
|
||||
// RUN: }" > %t3.script
|
||||
// RUN: ld.lld --hash-style=sysv --script %t3.script -shared %t1 %t2 -o %t6
|
||||
// RUN: llvm-objdump -triple=armv7a-none-linux-gnueabi -d %t6 | FileCheck --check-prefix=CHECKMIX %s
|
||||
// RUN: llvm-objdump -triple=armv7a-none-linux-gnueabi -d --no-show-raw-insn %t6 | FileCheck --check-prefix=CHECKMIX %s
|
||||
// RUN: llvm-readobj -S -r %t6 | FileCheck --check-prefix=DSORELMIX %s
|
||||
|
||||
// CHECKMIX: Disassembly of section .text:
|
||||
// CHECKMIX-EMPTY:
|
||||
// CHECKMIX-NEXT: func1:
|
||||
// CHECKMIX-NEXT: 1000: 1e ff 2f e1 bx lr
|
||||
// CHECKMIX-NEXT: 1000: bx lr
|
||||
// CHECKMIX: func2:
|
||||
// CHECKMIX-NEXT: 1004: 1e ff 2f e1 bx lr
|
||||
// CHECKMIX-NEXT: 1004: bx lr
|
||||
// CHECKMIX: func3:
|
||||
// CHECKMIX-NEXT: 1008: 1e ff 2f e1 bx lr
|
||||
// CHECKMIX-NEXT: 1008: bx lr
|
||||
// CHECKMIX: _start:
|
||||
// CHECKMIX-NEXT: 100c: 03 04 00 ea b #4108 <$a>
|
||||
// CHECKMIX-NEXT: 1010: 06 04 00 eb bl #4120 <$a>
|
||||
// CHECKMIX-NEXT: 1014: 09 04 00 0a beq #4132 <$a>
|
||||
// CHECKMIX-NEXT: 100c: b #4108 <$a>
|
||||
// CHECKMIX-NEXT: 1010: bl #4120 <$a>
|
||||
// CHECKMIX-NEXT: 1014: beq #4132 <$a>
|
||||
// CHECKMIX-EMPTY:
|
||||
// CHECKMIX-NEXT: Disassembly of section .plt:
|
||||
// CHECKMIX-EMPTY:
|
||||
// CHECKMIX-NEXT: $a:
|
||||
// CHECKMIX-NEXT: 2000: 04 e0 2d e5 str lr, [sp, #-4]!
|
||||
// CHECKMIX-NEXT: 2004: 04 e0 9f e5 ldr lr, [pc, #4]
|
||||
// CHECKMIX-NEXT: 2008: 0e e0 8f e0 add lr, pc, lr
|
||||
// CHECKMIX-NEXT: 200c: 08 f0 be e5 ldr pc, [lr, #8]!
|
||||
// CHECKMIX-NEXT: 2000: str lr, [sp, #-4]!
|
||||
// CHECKMIX-NEXT: 2004: ldr lr, [pc, #4]
|
||||
// CHECKMIX-NEXT: 2008: add lr, pc, lr
|
||||
// CHECKMIX-NEXT: 200c: ldr pc, [lr, #8]!
|
||||
// CHECKMIX: $d:
|
||||
// CHECKMIX-NEXT: 2010: 10 00 00 08 .word 0x08000010
|
||||
// CHECKMIX-NEXT: 2014: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// CHECKMIX-NEXT: 2018: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// CHECKMIX-NEXT: 201c: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// CHECKMIX: $a:
|
||||
// CHECKMIX-NEXT: 2020: 04 c0 9f e5 ldr r12, [pc, #4]
|
||||
// CHECKMIX-NEXT: 2024: 0f c0 8c e0 add r12, r12, pc
|
||||
// CHECKMIX-NEXT: 2028: 00 f0 9c e5 ldr pc, [r12]
|
||||
// CHECKMIX-NEXT: 2020: ldr r12, [pc, #4]
|
||||
// CHECKMIX-NEXT: 2024: add r12, r12, pc
|
||||
// CHECKMIX-NEXT: 2028: ldr pc, [r12]
|
||||
// CHECKMIX: $d:
|
||||
// CHECKMIX-NEXT: 202c: 00 00 00 08 .word 0x08000000
|
||||
// CHECKMIX: $a:
|
||||
// CHECKMIX-NEXT: 2030: 7f c6 8f e2 add r12, pc, #133169152
|
||||
// CHECKMIX-NEXT: 2034: ff ca 8c e2 add r12, r12, #1044480
|
||||
// CHECKMIX-NEXT: 2038: f8 ff bc e5 ldr pc, [r12, #4088]!
|
||||
// CHECKMIX-NEXT: 2030: add r12, pc, #133169152
|
||||
// CHECKMIX-NEXT: 2034: add r12, r12, #1044480
|
||||
// CHECKMIX-NEXT: 2038: ldr pc, [r12, #4088]!
|
||||
// CHECKMIX: $d:
|
||||
// CHECKMIX-NEXT: 203c: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
// CHECKMIX: $a:
|
||||
// CHECKMIX-NEXT: 2040: 7f c6 8f e2 add r12, pc, #133169152
|
||||
// CHECKMIX-NEXT: 2044: ff ca 8c e2 add r12, r12, #1044480
|
||||
// CHECKMIX-NEXT: 2048: ec ff bc e5 ldr pc, [r12, #4076]!
|
||||
// CHECKMIX-NEXT: 2040: add r12, pc, #133169152
|
||||
// CHECKMIX-NEXT: 2044: add r12, r12, #1044480
|
||||
// CHECKMIX-NEXT: 2048: ldr pc, [r12, #4076]!
|
||||
// CHECKMIX: $d:
|
||||
// CHECKMIX-NEXT: 204c: d4 d4 d4 d4 .word 0xd4d4d4d4
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t
|
||||
// RUN: ld.lld %t -o %t2 2>&1
|
||||
// RUN: llvm-objdump -d -triple=armv7a-none-linux-gnueabi %t2 | FileCheck %s
|
||||
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o
|
||||
// RUN: ld.lld %t.o -o %t
|
||||
// RUN: llvm-objdump -d -triple=armv7a-none-linux-gnueabi %t | FileCheck %s
|
||||
|
||||
// Test the R_ARM_SBREL32 relocation which calculates the offset of the Symbol
|
||||
// from the static base. We define the static base to be the address of the
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t
|
||||
// RUN: ld.lld --no-merge-exidx-entries %t --static -o %t2 2>&1
|
||||
// RUN: ld.lld --no-merge-exidx-entries %t --static -o %t2
|
||||
// RUN: llvm-readobj --symbols %t2 | FileCheck %s
|
||||
|
||||
// Check that on ARM we don't get a multiply defined symbol for __tls_get_addr
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o
|
||||
// RUN: ld.lld %t.o -o %t 2>&1
|
||||
// RUN: ld.lld %t.o -o %t
|
||||
// RUN: llvm-objdump -s -triple=armv7a-none-linux-gnueabi %t | FileCheck %s
|
||||
// RUN: ld.lld %t.o --target2=got-rel -o %t2 2>&1
|
||||
// RUN: ld.lld %t.o --target2=got-rel -o %t2
|
||||
// RUN: llvm-objdump -s -triple=armv7a-none-linux-gnueabi %t2 | FileCheck %s
|
||||
// RUN: ld.lld %t.o --target2=abs -o %t3 2>&1
|
||||
// RUN: ld.lld %t.o --target2=abs -o %t3
|
||||
// RUN: llvm-objdump -s -triple=armv7a-none-linux-gnueabi %t3 | FileCheck -check-prefix=CHECK-ABS %s
|
||||
// RUN: ld.lld %t.o --target2=rel -o %t4 2>&1
|
||||
// RUN: ld.lld %t.o --target2=rel -o %t4
|
||||
// RUN: llvm-objdump -s -triple=armv7a-none-linux-gnueabi %t4 | FileCheck -check-prefix=CHECK-REL %s
|
||||
|
||||
// The R_ARM_TARGET2 is present in .ARM.extab sections. It can be handled as
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
// RUN: .caller : { *(.text) } \
|
||||
// RUN: .R_ARM_CALL24_callee3 : { *(.R_ARM_CALL24_callee_high) } \
|
||||
// RUN: .R_ARM_CALL24_callee4 : { *(.R_ARM_CALL24_callee_thumb_high) } } " > %t.script
|
||||
// RUN: ld.lld --script %t.script %t %ttarget -o %t2 2>&1
|
||||
// RUN: ld.lld --script %t.script %t %ttarget -o %t2
|
||||
// RUN: llvm-objdump -d -triple=thumbv7a-none-linux-gnueabi %t2 | FileCheck -check-prefix=CHECK-THUMB %s
|
||||
// RUN: llvm-objdump -d -triple=armv7a-none-linux-gnueabi %t2 | FileCheck -check-prefix=CHECK-ARM %s
|
||||
// Test BLX instruction is chosen for Thumb BL/BLX instruction and ARM callee
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=thumbv7a-none-linux-gnueabi %s -o %t
|
||||
// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=thumbv7a-none-linux-gnueabi %S/Inputs/far-arm-thumb-abs.s -o %tfar
|
||||
// RUN: ld.lld %t %tfar -o %t2 2>&1
|
||||
// RUN: ld.lld %t %tfar -o %t2
|
||||
// RUN: llvm-objdump -d -triple=thumbv7a-none-linux-gnueabi %t2
|
||||
.syntax unified
|
||||
.thumb
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
// RUN: .callee1 : { *(.callee_low) } \
|
||||
// RUN: .caller : { *(.text) } \
|
||||
// RUN: .callee2 : { *(.callee_high) } } " > %t.script
|
||||
// RUN: ld.lld --script %t.script %t %tfar -o %t2 2>&1
|
||||
// RUN: ld.lld --script %t.script %t %tfar -o %t2
|
||||
// RUN: llvm-objdump -d -triple=thumbv7a-none-linux-gnueabi %t2 | FileCheck %s
|
||||
|
||||
.syntax unified
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=thumbv7a-none-linux-gnueabi %s -o %t
|
||||
// RUN: ld.lld %t -o %t2 2>&1
|
||||
// RUN: ld.lld %t -o %t2
|
||||
// The output file is large, most of it zeroes. We dissassemble only the
|
||||
// parts we need to speed up the test and avoid a large output file
|
||||
// RUN: llvm-objdump -d %t2 -start-address=524288 -stop-address=524316 -triple=thumbv7a-linux-gnueabihf | FileCheck -check-prefix=CHECK1 %s
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
// RUN: .R_ARM_JUMP24_callee_2 : { *(.R_ARM_JUMP24_callee_high) } \
|
||||
// RUN: .R_ARM_THM_JUMP_callee_2 : { *(.R_ARM_THM_JUMP_callee_high) } \
|
||||
// RUN: .got.plt 0x18b4 : { } } " > %t.script
|
||||
// RUN: ld.lld --script %t.script %t -o %t2 2>&1
|
||||
// RUN: ld.lld --script %t.script %t -o %t2
|
||||
// RUN: llvm-objdump -d -triple=thumbv7a-none-linux-gnueabi %t2 | FileCheck -check-prefix=CHECK-THUMB -check-prefix=CHECK-ABS-THUMB %s
|
||||
// RUN: llvm-objdump -d -triple=armv7a-none-linux-gnueabi %t2 | FileCheck -check-prefix=CHECK-ARM -check-prefix=CHECK-ABS-ARM %s
|
||||
// RUN: ld.lld --script %t.script %t -pie -o %t3 2>&1
|
||||
// RUN: ld.lld --script %t.script %t --shared -o %t4 2>&1
|
||||
// RUN: ld.lld --script %t.script %t -pie -o %t3
|
||||
// RUN: ld.lld --script %t.script %t --shared -o %t4
|
||||
// RUN: llvm-objdump -d -triple=thumbv7a-none-linux-gnueabi %t3 | FileCheck -check-prefix=CHECK-THUMB -check-prefix=CHECK-PI-THUMB %s
|
||||
// RUN: llvm-objdump -d -triple=armv7a-none-linux-gnueabi %t3 | FileCheck -check-prefix=CHECK-ARM -check-prefix=CHECK-PI-ARM %s
|
||||
// RUN: llvm-objdump -d -triple=thumbv7a-none-linux-gnueabi %t4 | FileCheck -check-prefix=CHECK-THUMB -check-prefix=CHECK-PI-PLT-THUMB %s
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t
|
||||
// RUN: ld.lld %t -o %t2 2>&1
|
||||
// RUN: ld.lld %t -o %t2
|
||||
// The output file is large, most of it zeroes. We dissassemble only the
|
||||
// parts we need to speed up the test and avoid a large output file
|
||||
// RUN: llvm-objdump -d %t2 -start-address=1048576 -stop-address=1048604 -triple=armv7a-linux-gnueabihf | FileCheck -check-prefix=CHECK1 %s
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
// RUN: .caller : { *(.caller) } \
|
||||
// RUN: .R_ARM_PC11_2 : { *(.R_ARM_PC11_2) } \
|
||||
// RUN: .text : { *(.text) } } " > %t.script
|
||||
// RUN: ld.lld --script %t.script %t %S/Inputs/arm-thumb-narrow-branch.o -o %t2 2>&1
|
||||
// RUN: ld.lld --script %t.script %t %S/Inputs/arm-thumb-narrow-branch.o -o %t2
|
||||
// RUN: llvm-objdump -d -triple=thumbv7a-none-linux-gnueabi %t2 | FileCheck %s
|
||||
|
||||
// Test the R_ARM_PC11 relocation which is used with the narrow encoding of B.N
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -filetype=obj -triple=thumbv7a-none-linux-gnueabi %s -o %t
|
||||
// RUN: ld.lld %t -o %t2 2>&1
|
||||
// RUN: ld.lld %t -o %t2
|
||||
// RUN: llvm-objdump -triple=thumbv7a-none-linux-gnueabi -d %t2 | FileCheck %s
|
||||
|
||||
// Check that no thunks are created for an undefined weak symbol
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=thumbv7a-none-linux-gnueabi %s -o %t
|
||||
// RUN: ld.lld %t -o %t2 2>&1
|
||||
// RUN: ld.lld %t -o %t2
|
||||
// The output file is large, most of it zeroes. We dissassemble only the
|
||||
// parts we need to speed up the test and avoid a large output file
|
||||
// RUN: llvm-objdump -d %t2 -start-address=1048576 -stop-address=1048588 -triple=thumbv7a-linux-gnueabihf | FileCheck -check-prefix=CHECK1 %s
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=thumbv7a-none-linux-gnueabi %s -o %t
|
||||
// RUN: ld.lld %t -o %t2 2>&1
|
||||
// RUN: ld.lld %t -o %t2
|
||||
// RUN: llvm-objdump -d %t2 -start-address=69632 -stop-address=69646 -triple=thumbv7a-linux-gnueabihf | FileCheck -check-prefix=CHECK1 %s
|
||||
// RUN: llvm-objdump -d %t2 -start-address=16846856 -stop-address=16846874 -triple=thumbv7a-linux-gnueabihf | FileCheck -check-prefix=CHECK2 %s
|
||||
.syntax unified
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t
|
||||
// RUN: ld.lld %t -o %t2 2>&1
|
||||
// RUN: ld.lld %t -o %t2
|
||||
// RUN: llvm-readobj --symbols %t2 | FileCheck %s
|
||||
// RUN: ld.lld --shared %t -o %t3 2>&1
|
||||
// RUN: ld.lld --shared %t -o %t3
|
||||
// RUN: llvm-readobj --symbols %t3 | FileCheck -check-prefix=CHECK-PI %s
|
||||
|
||||
// Check that the symbols generated for Thunks have the correct symbol type
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -filetype=obj -triple=thumbv7a-none-linux-gnueabi %s -o %t
|
||||
// RUN: ld.lld %t -o %t2 2>&1
|
||||
// RUN: ld.lld %t -o %t2
|
||||
// RUN: llvm-objdump -triple=thumbv7a-none-linux-gnueabi -d %t2 | FileCheck %s
|
||||
|
||||
// Check that the ARM ABI rules for undefined weak symbols are applied.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=thumbv7a-none-linux-gnueabi %s -o %t
|
||||
// RUN: ld.lld %t -o %t2 2>&1
|
||||
// RUN: ld.lld %t -o %t2
|
||||
// RUN: llvm-objdump -d -triple=thumbv7a-none-linux-gnueabi -start-address=69632 -stop-address=69636 %t2 | FileCheck -check-prefix=CHECK1 %s
|
||||
// RUN: llvm-objdump -d -triple=thumbv7a-none-linux-gnueabi -start-address=73732 -stop-address=73742 %t2 | FileCheck -check-prefix=CHECK2 %s
|
||||
// RUN: llvm-objdump -d -triple=thumbv7a-none-linux-gnueabi -start-address=16850936 -stop-address=16850940 %t2 | FileCheck -check-prefix=CHECK3 %s
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
// RUN: . = SIZEOF_HEADERS; \
|
||||
// RUN: .text_low : { *(.text_low) *(.text_low2) . = . + 0x2000000 ; *(.text_high) *(.text_high2) } \
|
||||
// RUN: } " > %t.script
|
||||
// RUN: ld.lld --script %t.script %t -o %t2 2>&1
|
||||
// RUN: ld.lld --script %t.script %t -o %t2
|
||||
// RUN: llvm-objdump -d %t2 -start-address=148 -stop-address=188 -triple=thumbv7a-linux-gnueabihf | FileCheck -check-prefix=CHECK1 %s
|
||||
// RUN: llvm-objdump -d %t2 -start-address=33554620 -stop-address=33554654 -triple=thumbv7a-linux-gnueabihf | FileCheck -check-prefix=CHECK2 %s
|
||||
// Test that range extension thunks can handle location expressions within
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// RUN: .textl : { *(.text_l0*) *(.text_l1*) *(.text_l2*) *(.text_l3*) } \
|
||||
// RUN: .texth : { *(.text_h0*) *(.text_h1*) *(.text_h2*) *(.text_h3*) } \
|
||||
// RUN: }" > %t.script
|
||||
// RUN: ld.lld --script %t.script %t -o %t2 2>&1
|
||||
// RUN: ld.lld --script %t.script %t -o %t2
|
||||
// The output file is large, most of it zeroes. We dissassemble only the
|
||||
// parts we need to speed up the test and avoid a large output file
|
||||
// RUN: llvm-objdump -d %t2 -start-address=1048576 -stop-address=1048594 -triple=thumbv7a-linux-gnueabihf | FileCheck --check-prefix=CHECK1 %s
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// RUN: .text_high 0x2000000 : { *(.text_high) } \
|
||||
// RUN: .data : { *(.data) } \
|
||||
// RUN: }" > %t.script
|
||||
// RUN: ld.lld --script %t.script %t -o %t2 2>&1
|
||||
// RUN: ld.lld --script %t.script %t -o %t2
|
||||
// RUN: llvm-objdump -d -triple=thumbv7a-none-linux-gnueabi %t2 | FileCheck %s
|
||||
.syntax unified
|
||||
.section .text_low, "ax", %progbits
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// RUN: echo "SECTIONS { \
|
||||
// RUN: .text 0x100000 : { *(SORT_BY_NAME(.text.*)) } \
|
||||
// RUN: }" > %t.script
|
||||
// RUN: ld.lld --script %t.script %t -o %t2 2>&1
|
||||
// RUN: ld.lld --script %t.script %t -o %t2
|
||||
// RUN: llvm-objdump -d %t2 -start-address=1048576 -stop-address=1048584 -triple=thumbv7a-linux-gnueabihf | FileCheck -check-prefix=CHECK1 %s
|
||||
// RUN: llvm-objdump -d %t2 -start-address=16777220 -stop-address=16777230 -triple=thumbv7a-linux-gnueabihf | FileCheck -check-prefix=CHECK2 %s
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// RUN: .text_low : { *(.text_low) *(.text_low2) } \
|
||||
// RUN: .text_high 0x2000000 : { *(.text_high) *(.text_high2) } \
|
||||
// RUN: } " > %t.script
|
||||
// RUN: ld.lld --script %t.script %t -o %t2 2>&1
|
||||
// RUN: ld.lld --script %t.script %t -o %t2
|
||||
// RUN: llvm-objdump -d -triple=thumbv7a-none-linux-gnueabi %t2 | FileCheck %s
|
||||
// Simple test that we can support range extension thunks with linker scripts
|
||||
.syntax unified
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=armv5-none-linux-gnueabi %s -o %t
|
||||
// RUN: ld.lld %t -o %t2 --shared 2>&1
|
||||
// RUN: ld.lld %t -o %t2 --shared
|
||||
// RUN: llvm-objdump --start-address=7340044 --stop-address=7340048 --triple=armv5-none-linux-gnueabi -d %t2 | FileCheck %s
|
||||
// RUN: llvm-objdump --start-address=8388620 --stop-address=8388624 --triple=thumbv5-none-linux-gnueabi -d %t2 | FileCheck %s -check-prefix=CHECK-CALL
|
||||
// RUN: llvm-objdump --start-address=13631520 --stop-address=13631584 --triple=armv5-none-linux-gnueabi -d %t2 | FileCheck %s -check-prefix=CHECK-PLT
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t
|
||||
// RUN: ld.lld %t -o %t2 2>&1
|
||||
// RUN: ld.lld %t -o %t2
|
||||
// The output file is large, most of it zeroes. We dissassemble only the
|
||||
// parts we need to speed up the test and avoid a large output file
|
||||
// RUN: llvm-objdump -d %t2 -start-address=1048578 -stop-address=1048586 -triple=thumbv7a-linux-gnueabihf | FileCheck -check-prefix=CHECK1 %s
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// REQUIRES: arm
|
||||
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t
|
||||
// RUN: ld.lld %t -o %t2 2>&1
|
||||
// RUN: ld.lld %t -o %t2
|
||||
// RUN: llvm-objdump -triple=armv7a-none-linux-gnueabi -d %t2 | FileCheck %s
|
||||
|
||||
// Check that the ARM ABI rules for undefined weak symbols are applied.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// REQUIRES: arm, aarch64
|
||||
// REQUIRES: arm
|
||||
|
||||
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %p/Inputs/arm-shared.s -o %t.so.o
|
||||
// RUN: ld.lld -shared %t.so.o -o %t.so
|
Loading…
Reference in New Issue