[llvm-readobj] - Simplify stack-sizes.test test case.
[llvm-complete.git] / test / MC / ARM / elf-thumbfunc-reloc2.s
blobcf54b00d48fae4d5d19d088cba1e0fbd54d95578
1 // RUN: llvm-mc %s -triple=thumbv7-linux-gnueabi \
2 // RUN: -filetype=obj -o - | llvm-readobj -S --sd -r --symbols | \
3 // RUN: FileCheck %s
5 // We want to test relocatable thumb function call.
7 .thumb_func
8 foo:
9 .fnstart
10 bx lr
11 .cantunwind
12 .fnend
14 .align 1
15 bar:
16 .fnstart
17 push {r7, lr}
18 bl foo(PLT)
19 pop {r7, pc}
20 .cantunwind
21 .fnend
23 // make sure that bl 0 <foo> (fff7feff) is correctly encoded
24 // CHECK: Sections [
25 // CHECK: SectionData (
26 // CHECK: 0000: 704780B5 FFF7FEFF 80BD
27 // CHECK: )
28 // CHECK: ]
30 // CHECK: Relocations [
31 // CHECK-NEXT: Section {{.*}} .rel.text {
32 // CHECK-NEXT: 0x4 R_ARM_THM_CALL foo 0x0
33 // CHECK-NEXT: }
34 // CHECK-NEXT: Section {{.*}} .rel.ARM.exidx {
35 // CHECK-NEXT: 0x0 R_ARM_PREL31 .text 0x0
36 // CHECK-NEXT: 0x8 R_ARM_PREL31 .text 0x0
37 // CHECK-NEXT: }
38 // CHECK-NEXT: ]
40 // make sure foo is thumb function: bit 0 = 1
41 // CHECK: Symbols [
42 // CHECK: Symbol {
43 // CHECK: Name: foo
44 // CHECK-NEXT: Value: 0x1