1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r -t | FileCheck %s 2 3 defined1: 4 defined2: 5 defined3: 6 .symver defined1, bar1@zed 7 .symver undefined1, bar2@zed 8 9 .symver defined2, bar3@@zed 10 11 .symver defined3, bar5@@@zed 12 .symver undefined3, bar6@@@zed 13 14 .long defined1 15 .long undefined1 16 .long defined2 17 .long defined3 18 .long undefined3 19 20 .global global1 21 .symver global1, g1@@zed 22 global1: 23 24 // CHECK: Relocations [ 25 // CHECK-NEXT: Section (2) .rela.text { 26 // CHECK-NEXT: 0x0 R_X86_64_32 .text 0x0 27 // CHECK-NEXT: 0x4 R_X86_64_32 bar2@zed 0x0 28 // CHECK-NEXT: 0x8 R_X86_64_32 .text 0x0 29 // CHECK-NEXT: 0xC R_X86_64_32 .text 0x0 30 // CHECK-NEXT: 0x10 R_X86_64_32 bar6@zed 0x0 31 // CHECK-NEXT: } 32 // CHECK-NEXT: ] 33 34 // CHECK: Symbol { 35 // CHECK: Name: bar1@zed (19) 36 // CHECK-NEXT: Value: 0x0 37 // CHECK-NEXT: Size: 0 38 // CHECK-NEXT: Binding: Local 39 // CHECK-NEXT: Type: None 40 // CHECK-NEXT: Other: 0 41 // CHECK-NEXT: Section: .text (0x1) 42 // CHECK-NEXT: } 43 // CHECK-NEXT: Symbol { 44 // CHECK-NEXT: Name: bar3@@zed (37) 45 // CHECK-NEXT: Value: 0x0 46 // CHECK-NEXT: Size: 0 47 // CHECK-NEXT: Binding: Local 48 // CHECK-NEXT: Type: None 49 // CHECK-NEXT: Other: 0 50 // CHECK-NEXT: Section: .text (0x1) 51 // CHECK-NEXT: } 52 // CHECK-NEXT: Symbol { 53 // CHECK-NEXT: Name: bar5@@zed (47) 54 // CHECK-NEXT: Value: 0x0 55 // CHECK-NEXT: Size: 0 56 // CHECK-NEXT: Binding: Local 57 // CHECK-NEXT: Type: None 58 // CHECK-NEXT: Other: 0 59 // CHECK-NEXT: Section: .text (0x1) 60 // CHECK-NEXT: } 61 // CHECK-NEXT: Symbol { 62 // CHECK-NEXT: Name: defined1 (1) 63 // CHECK-NEXT: Value: 0x0 64 // CHECK-NEXT: Size: 0 65 // CHECK-NEXT: Binding: Local 66 // CHECK-NEXT: Type: None 67 // CHECK-NEXT: Other: 0 68 // CHECK-NEXT: Section: .text (0x1) 69 // CHECK-NEXT: } 70 // CHECK-NEXT: Symbol { 71 // CHECK-NEXT: Name: defined2 (10) 72 // CHECK-NEXT: Value: 0x0 73 // CHECK-NEXT: Size: 0 74 // CHECK-NEXT: Binding: Local 75 // CHECK-NEXT: Type: None 76 // CHECK-NEXT: Other: 0 77 // CHECK-NEXT: Section: .text (0x1) 78 // CHECK-NEXT: } 79 // CHECK-NEXT: Symbol { 80 // CHECK-NEXT: Name: .text (0) 81 // CHECK-NEXT: Value: 0x0 82 // CHECK-NEXT: Size: 0 83 // CHECK-NEXT: Binding: Local 84 // CHECK-NEXT: Type: Section 85 // CHECK-NEXT: Other: 0 86 // CHECK-NEXT: Section: .text (0x1) 87 // CHECK-NEXT: } 88 // CHECK-NEXT: Symbol { 89 // CHECK-NEXT: Name: .data (0) 90 // CHECK-NEXT: Value: 0x0 91 // CHECK-NEXT: Size: 0 92 // CHECK-NEXT: Binding: Local 93 // CHECK-NEXT: Type: Section 94 // CHECK-NEXT: Other: 0 95 // CHECK-NEXT: Section: .data (0x3) 96 // CHECK-NEXT: } 97 // CHECK-NEXT: Symbol { 98 // CHECK-NEXT: Name: .bss (0) 99 // CHECK-NEXT: Value: 0x0 100 // CHECK-NEXT: Size: 0 101 // CHECK-NEXT: Binding: Local 102 // CHECK-NEXT: Type: Section 103 // CHECK-NEXT: Other: 0 104 // CHECK-NEXT: Section: .bss (0x4) 105 // CHECK-NEXT: } 106 // CHECK-NEXT: Symbol { 107 // CHECK-NEXT: Name: g1@@zed (74) 108 // CHECK-NEXT: Value: 0x14 109 // CHECK-NEXT: Size: 0 110 // CHECK-NEXT: Binding: Global 111 // CHECK-NEXT: Type: None 112 // CHECK-NEXT: Other: 0 113 // CHECK-NEXT: Section: .text (0x1) 114 // CHECK-NEXT: } 115 // CHECK-NEXT: Symbol { 116 // CHECK-NEXT: Name: global1 (66) 117 // CHECK-NEXT: Value: 0x14 118 // CHECK-NEXT: Size: 0 119 // CHECK-NEXT: Binding: Global 120 // CHECK-NEXT: Type: None 121 // CHECK-NEXT: Other: 0 122 // CHECK-NEXT: Section: .text (0x1) 123 // CHECK-NEXT: } 124 // CHECK-NEXT: Symbol { 125 // CHECK-NEXT: Name: bar2@zed (28) 126 // CHECK-NEXT: Value: 0x0 127 // CHECK-NEXT: Size: 0 128 // CHECK-NEXT: Binding: Global 129 // CHECK-NEXT: Type: None 130 // CHECK-NEXT: Other: 0 131 // CHECK-NEXT: Section: (0x0) 132 // CHECK-NEXT: } 133 // CHECK-NEXT: Symbol { 134 // CHECK-NEXT: Name: bar6@zed (57) 135 // CHECK-NEXT: Value: 0x0 136 // CHECK-NEXT: Size: 0 137 // CHECK-NEXT: Binding: Global 138 // CHECK-NEXT: Type: None 139 // CHECK-NEXT: Other: 0 140 // CHECK-NEXT: Section: (0x0) 141 // CHECK-NEXT: } 142 // CHECK-NEXT: ] 143