2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
3 # RUN: ld.lld --emit-relocs %t1.o -o %t
4 # RUN: llvm-readobj --symbols -r -S %t | FileCheck %s
6 ## Check single dash form.
7 # RUN: ld.lld -emit-relocs %t1.o -o %t1
8 # RUN: llvm-readobj --symbols -r -S %t1 | FileCheck %s
11 # RUN: ld.lld -q %t1.o -o %t2
12 # RUN: llvm-readobj --symbols -r -S %t2 | FileCheck %s
16 # CHECK: Name: .rela.text
17 # CHECK-NEXT: Type: SHT_RELA
19 # CHECK-NEXT: SHF_INFO_LINK
21 # CHECK: Relocations [
22 # CHECK-NEXT: Section ({{.*}}) .rela.text {
23 # CHECK-NEXT: 0x201122 R_X86_64_32 .text 0x1
24 # CHECK-NEXT: 0x201127 R_X86_64_PLT32 fn 0xFFFFFFFFFFFFFFFC
25 # CHECK-NEXT: 0x20112E R_X86_64_32 .text 0xD
26 # CHECK-NEXT: 0x201133 R_X86_64_PLT32 fn2 0xFFFFFFFFFFFFFFFC
29 # CHECK-NEXT: Symbols [
30 # CHECK-NEXT: Symbol {
32 # CHECK-NEXT: Value: 0x0
34 # CHECK-NEXT: Binding: Local
35 # CHECK-NEXT: Type: None
36 # CHECK-NEXT: Other: 0
37 # CHECK-NEXT: Section: Undefined
39 # CHECK-NEXT: Symbol {
40 # CHECK-NEXT: Name: bar
41 # CHECK-NEXT: Value: 0x201121
43 # CHECK-NEXT: Binding: Local
44 # CHECK-NEXT: Type: None
45 # CHECK-NEXT: Other: 0
46 # CHECK-NEXT: Section: .text
48 # CHECK-NEXT: Symbol {
49 # CHECK-NEXT: Name: foo
50 # CHECK-NEXT: Value: 0x20112D
52 # CHECK-NEXT: Binding: Local
53 # CHECK-NEXT: Type: None
54 # CHECK-NEXT: Other: 0
55 # CHECK-NEXT: Section: .text
57 # CHECK-NEXT: Symbol {
59 # CHECK-NEXT: Value: 0x201120
61 # CHECK-NEXT: Binding: Local
62 # CHECK-NEXT: Type: Section
63 # CHECK-NEXT: Other: 0
64 # CHECK-NEXT: Section: .text
66 # CHECK-NEXT: Symbol {
68 # CHECK-NEXT: Value: 0x0
70 # CHECK-NEXT: Binding: Local
71 # CHECK-NEXT: Type: Section
72 # CHECK-NEXT: Other: 0
73 # CHECK-NEXT: Section: .comment
75 # CHECK-NEXT: Symbol {
76 # CHECK-NEXT: Name: fn
77 # CHECK-NEXT: Value: 0x201120
79 # CHECK-NEXT: Binding: Global
80 # CHECK-NEXT: Type: Function
81 # CHECK-NEXT: Other: 0
82 # CHECK-NEXT: Section: .text
84 # CHECK-NEXT: Symbol {
85 # CHECK-NEXT: Name: fn2
86 # CHECK-NEXT: Value: 0x20112C
88 # CHECK-NEXT: Binding: Global
89 # CHECK-NEXT: Type: Function
90 # CHECK-NEXT: Other: 0
91 # CHECK-NEXT: Section: .text
95 .section .text.fn,"ax",@progbits,unique,0
106 .section .text.fn2,"ax",@progbits,unique,1