Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / ELF / file.s
blob4c96e8834d6d1aaec03c38a41f12c280e6d42cbd
1 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o - | llvm-readelf -s - | FileCheck %s
3 # CHECK: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
4 # CHECK-NEXT: 1: 0000000000000000 0 FILE LOCAL DEFAULT ABS foo.c
5 # CHECK-NEXT: 2: 0000000000000000 0 SECTION LOCAL DEFAULT 2 .text
6 # CHECK-NEXT: 3: 0000000000000000 0 SECTION LOCAL DEFAULT 4 foo
7 # CHECK-NEXT: 4: 0000000000000000 0 NOTYPE LOCAL DEFAULT 4 local0
8 # CHECK-NEXT: 5: 0000000000000000 0 FILE LOCAL DEFAULT ABS bar.c
9 # CHECK-NEXT: 6: 0000000000000000 0 SECTION LOCAL DEFAULT 6 bar0
10 # CHECK-NEXT: 7: 0000000000000000 0 NOTYPE LOCAL DEFAULT 6 local1
11 # CHECK-NEXT: 8: 0000000000000000 0 SECTION LOCAL DEFAULT 8 bar1
12 # CHECK-NEXT: 9: 0000000000000000 0 NOTYPE LOCAL DEFAULT 8 local2
13 # CHECK-NEXT: 10: 0000000000000000 0 FILE LOCAL DEFAULT ABS bar.c
14 # CHECK-NEXT: 11: 0000000000000008 0 NOTYPE GLOBAL DEFAULT 2 foo.c
15 # CHECK-NEXT: 12: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 6 bar.c
17 .quad .text
19 ## A STT_FILE symbol and a symbol of the same name can coexist.
20 .file "foo.c"
21 .globl foo.c
22 foo.c:
23 .section foo,"a"
24 local0:
25 .quad foo
27 ## STT_FILE "bar.c" precedes subsequently defined local symbols.
28 .file "bar.c"
29 .section bar0,"a"
30 .globl bar.c
31 bar.c:
32 local1:
33 .quad bar0
35 .section bar1,"a"
36 local2:
37 .quad bar1
39 ## STT_FILE symbols of the same name are not de-duplicated.
40 .file "bar.c"