[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / local-symbols-order.s
blob46530a4faa8b69088bf8a3c33b7d2e52224994ca
1 # REQUIRES: x86
3 # RUN: echo '.data; .file "file2"; foo2:; .global bar2; .hidden bar2; bar2:' > %t2.s
4 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %t2.s -o %t2.o
5 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
7 # RUN: ld.lld -o %t %t1.o %t2.o --emit-relocs
8 # RUN: llvm-readelf --symbols --sections %t | FileCheck %s
10 ## Check we sort local symbols to match the following order:
11 ## file1, local1, section1, hidden1, file2, local2, section2, hidden2 ...
13 # CHECK: Section Headers:
14 # CHECK: [Nr] Name
15 # CHECK: [ [[ST:.*]]] .text
16 # CHECK: [ [[SD:.*]]] .data
17 # CHECK: [ [[SC:.*]]] .comment
19 # CHECK: Size Type Bind Vis Ndx Name
20 # CHECK-NEXT: 0 NOTYPE LOCAL DEFAULT UND
21 # CHECK-NEXT: 0 FILE LOCAL DEFAULT ABS file1
22 # CHECK-NEXT: 0 NOTYPE LOCAL DEFAULT 1 foo1
23 # CHECK-NEXT: 0 SECTION LOCAL DEFAULT [[ST]]
24 # CHECK-NEXT: 0 NOTYPE LOCAL HIDDEN 1 bar1
25 # CHECK-NEXT: 0 FILE LOCAL DEFAULT ABS file2
26 # CHECK-NEXT: 0 NOTYPE LOCAL DEFAULT 2 foo2
27 # CHECK-NEXT: 0 SECTION LOCAL DEFAULT [[SD]]
28 # CHECK-NEXT: 0 NOTYPE LOCAL HIDDEN 2 bar2
29 # CHECK-NEXT: 0 SECTION LOCAL DEFAULT [[SC]]
31 foo1:
33 .global bar1
34 .hidden bar1
35 bar1:
37 .file "file1"