File tree Expand file tree Collapse file tree 3 files changed +67
-0
lines changed
llvm/test/ExecutionEngine/JITLink/ppc64 Expand file tree Collapse file tree 3 files changed +67
-0
lines changed Original file line number Diff line number Diff line change
1
+ .text
2
+ .abiversion 2
3
+ .weak foo
4
+ .p2align 4
5
+ .type foo,@function
6
+ foo:
7
+ .Lfunc_begin0:
8
+ li 3 , 1
9
+ blr
10
+ .long 0
11
+ .quad 0
12
+ .Lfunc_end0:
13
+ .size foo, .Lfunc_end0-.Lfunc_begin0
Original file line number Diff line number Diff line change
1
+ .text
2
+ .abiversion 2
3
+ .weak foo
4
+ .p2align 4
5
+ .type foo,@function
6
+ foo:
7
+ .Lfunc_begin0:
8
+ li 3 , 0
9
+ blr
10
+ .long 0
11
+ .quad 0
12
+ .Lfunc_end0:
13
+ .size foo, .Lfunc_end0-.Lfunc_begin0
14
+
15
+ .globl main
16
+ .p2align 4
17
+ .type main,@function
18
+ main:
19
+ .Lfunc_begin1:
20
+ .Lfunc_gep1:
21
+ addis 2 , 12 , .TOC.-.Lfunc_gep1@ha
22
+ addi 2 , 2 , .TOC.-.Lfunc_gep1@l
23
+ .Lfunc_lep1:
24
+ .localentry main, .Lfunc_lep1-.Lfunc_gep1
25
+ mflr 0
26
+ stdu 1 , -32 (1 )
27
+ std 0 , 48 (1 )
28
+ bl foo
29
+ nop
30
+ addi 1 , 1 , 32
31
+ ld 0 , 16 (1 )
32
+ mtlr 0
33
+ blr
34
+ .long 0
35
+ .quad 0
36
+ .Lfunc_end1:
37
+ .size main, .Lfunc_end1-.Lfunc_begin1
Original file line number Diff line number Diff line change
1
+ # REQUIRES: asserts
2
+ # RUN: rm -rf %t && mkdir -p %t
3
+ # RUN: llvm-mc -triple=powerpc64le-unknown-linux-gnu -filetype=obj -o \
4
+ # RUN: %t/external_weak.o %S/Inputs/external_weak.s
5
+ # RUN: llvm-mc -triple=powerpc64le-unknown-linux-gnu -filetype=obj -o \
6
+ # RUN: %t/external_weak_main.o %S/Inputs/external_weak_main.s
7
+ # RUN: llvm-jitlink -noexec -debug-only=jitlink %t/external_weak.o \
8
+ # RUN: %t/external_weak_main.o 2>&1 | FileCheck %s
9
+ # CHECK: Created ELFLinkGraphBuilder for "{{.*}}external_weak_main.o"
10
+ # CHECK: Creating defined graph symbol for ELF symbol "foo"
11
+ # CHECK: External symbols:
12
+ # CHECK: {{.*}} linkage: weak, scope: default, dead - foo
13
+ # CHECK: section .text:
14
+ # CHECK: {{.*}} kind = CallBranchDelta, target = foo
15
+ # `foo` is weak in both relocatable files. `foo` is resolved to the one
16
+ # defined in `%t/external_weak.o`. So calling `foo` in `%t/external_weak_main.o`
17
+ # is expected to be an external function call.
You can’t perform that action at this time.
0 commit comments