[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / gc-sections-string.s
blobc6dbb5d482b240379e1be247a84d5623d8bfc733
1 // REQUIRES: x86
2 // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3 // RUN: ld.lld %t.o -o %t --gc-sections
4 // RUN: llvm-readobj --symbols %t | FileCheck %s
6 // CHECK: Symbols [
7 // CHECK-NEXT: Symbol {
8 // CHECK-NEXT: Name: (0)
9 // CHECK-NEXT: Value: 0x0
10 // CHECK-NEXT: Size: 0
11 // CHECK-NEXT: Binding: Local (0x0)
12 // CHECK-NEXT: Type: None (0x0)
13 // CHECK-NEXT: Other: 0
14 // CHECK-NEXT: Section: Undefined (0x0)
15 // CHECK-NEXT: }
16 // CHECK-NEXT: Symbol {
17 // CHECK-NEXT: Name: s3
18 // CHECK-NEXT: Value: 0x200125
19 // CHECK-NEXT: Size: 0
20 // CHECK-NEXT: Binding: Local (0x0)
21 // CHECK-NEXT: Type: Object (0x1)
22 // CHECK-NEXT: Other: 0
23 // CHECK-NEXT: Section: .rodata (0x1)
24 // CHECK-NEXT: }
25 // CHECK-NEXT: Symbol {
26 // CHECK-NEXT: Name: s1
27 // CHECK-NEXT: Value: 0x200120
28 // CHECK-NEXT: Size: 0
29 // CHECK-NEXT: Binding: Local (0x0)
30 // CHECK-NEXT: Type: Object (0x1)
31 // CHECK-NEXT: Other [ (0x2)
32 // CHECK-NEXT: STV_HIDDEN (0x2)
33 // CHECK-NEXT: ]
34 // CHECK-NEXT: Section: .rodata (0x1)
35 // CHECK-NEXT: }
36 // CHECK-NEXT: Symbol {
37 // CHECK-NEXT: Name: _start
38 // CHECK-NEXT: Value:
39 // CHECK-NEXT: Size: 0
40 // CHECK-NEXT: Binding: Global (0x1)
41 // CHECK-NEXT: Type: Function (0x2)
42 // CHECK-NEXT: Other: 0
43 // CHECK-NEXT: Section: .text (0x2)
44 // CHECK-NEXT: }
45 // CHECK-NEXT: ]
47 .text
48 .globl _start
49 .type _start,@function
50 _start:
51 movl $s1, %eax
52 movl $s3, %eax
54 .hidden s1
55 .type s1,@object
56 .section .rodata.str1.1,"aMS",@progbits,1
57 .globl s1
58 s1:
59 .asciz "abcd"
61 .hidden s2
62 .type s2,@object
63 .globl s2
64 s2:
65 .asciz "efgh"
67 .type s3,@object
68 s3:
69 .asciz "ijkl"
71 .type s4,@object
72 .globl s4
73 s4:
74 .asciz "mnop"