1 ; RUN: llc -mtriple=x86_64-linux-gnu -relocation-model=pic -data-sections -o - %s --asm-verbose=0 | FileCheck %s -check-prefixes=CHECK
3 ; Just ensure that we can write to an object file without error.
4 ; RUN: llc -filetype=obj -mtriple=x86_64-linux-gnu -relocation-model=pic -data-sections -o /dev/null %s
6 declare void @extern_func()
8 ; CHECK: call_extern_func:
9 ; CHECK: callq extern_func@PLT
10 define void @call_extern_func() {
11 call void dso_local_equivalent @extern_func()
15 declare hidden void @hidden_func()
16 declare protected void @protected_func()
17 declare dso_local void @dso_local_func()
18 define internal void @internal_func() {
22 define private void @private_func() {
27 ; CHECK: call_hidden_func:
28 ; CHECK: callq hidden_func{{$}}
29 define void @call_hidden_func() {
30 call void dso_local_equivalent @hidden_func()
34 ; CHECK: call_protected_func:
35 ; CHECK: callq protected_func{{$}}
36 define void @call_protected_func() {
37 call void dso_local_equivalent @protected_func()
41 ; CHECK: call_dso_local_func:
42 ; CHECK: callq dso_local_func{{$}}
43 define void @call_dso_local_func() {
44 call void dso_local_equivalent @dso_local_func()
48 ; CHECK: call_internal_func:
49 ; CHECK: callq internal_func{{$}}
50 define void @call_internal_func() {
51 call void dso_local_equivalent @internal_func()
55 define void @aliasee_func() {
60 @alias_func = alias void (), ptr @aliasee_func
61 @dso_local_alias_func = dso_local alias void (), ptr @aliasee_func
63 ; CHECK: call_alias_func:
64 ; CHECK: callq alias_func@PLT
65 define void @call_alias_func() {
66 call void dso_local_equivalent @alias_func()
70 ; CHECK: call_dso_local_alias_func:
71 ; CHECK: callq .Ldso_local_alias_func$local{{$}}
72 define void @call_dso_local_alias_func() {
73 call void dso_local_equivalent @dso_local_alias_func()
77 @ifunc_func = ifunc void (), ptr @resolver
78 @dso_local_ifunc_func = dso_local ifunc void (), ptr @resolver
80 define internal ptr @resolver() {
85 ; If an ifunc is not dso_local already, then we should still emit a stub for it
86 ; to ensure it will be dso_local.
87 ; CHECK: call_ifunc_func:
88 ; CHECK: callq ifunc_func@PLT
89 define void @call_ifunc_func() {
90 call void dso_local_equivalent @ifunc_func()
94 ; CHECK: call_dso_local_ifunc_func:
95 ; CHECK: callq dso_local_ifunc_func{{$}}
96 define void @call_dso_local_ifunc_func() {
97 call void dso_local_equivalent @dso_local_ifunc_func()