[rtsan] Add fork/execve interceptors (#117198)
[llvm-project.git] / llvm / test / MC / ELF / symver-remove.s
blob81257b7ca9599018736f43571dd101e778b02066
1 # RUN: llvm-mc -triple=x86_64 %s | FileCheck %s --check-prefix=ASM
2 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t
3 # RUN: llvm-readelf -s %t | FileCheck %s
5 # ASM: .symver nondef, nondef@v1, remove
6 # ASM-NEXT: nondef:
7 # ASM: .symver def0, def0@@v2, remove
8 # ASM-NEXT: .symver def1, def1@@@v2{{$}}
9 # ASM-NEXT: def0:
10 # ASM-NEXT: def1:
11 # ASM: .symver def2, def2@v1, remove
12 # ASM-NEXT: .symver def2, def2@@v2{{$}}
13 # ASM-NEXT: def2:
15 # CHECK: 1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT [[#]] nondef@v1
16 # CHECK-NEXT: 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT [[#]] def0@@v2
17 # CHECK-NEXT: 3: 0000000000000000 0 NOTYPE GLOBAL DEFAULT [[#]] def1@@v2
18 # CHECK-NEXT: 4: 0000000000000000 0 NOTYPE GLOBAL DEFAULT [[#]] def2@v1
19 # CHECK-NEXT: 5: 0000000000000000 0 NOTYPE GLOBAL DEFAULT [[#]] def2@@v2
20 # CHECK-NOT: {{.}}
22 .globl nondef
23 .symver nondef, nondef@v1, remove
24 nondef:
26 .globl def0, def1, def2
27 .symver def0, def0@@v2, remove
28 .symver def1, def1@@@v2, remove
29 def0:
30 def1:
32 ## Giving multiple versions to the same original symbol is not useful.
33 ## This test just documents the behavior.
34 .symver def2, def2@v1, remove
35 .symver def2, def2@@v2
36 def2: