[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / test / ExecutionEngine / JITLink / X86 / ELF_x86-64_large_pic_relocations.s
blobb70debd8565ba2133c8e889a73e2639e0f75b90c
1 # RUN: rm -rf %t && mkdir -p %t
2 # RUN: llvm-mc -triple=x86_64-unknown-linux -position-independent -filetype=obj \
3 # RUN: -large-code-model -o %t/elf_lg_pic_reloc.o %s
4 # RUN: llvm-jitlink -noexec -slab-allocate 100Kb -slab-address 0xfff00000 \
5 # RUN: -check %s %t/elf_lg_pic_reloc.o
7 # Test ELF large/PIC relocations.
9 .text
10 .file "testcase.c"
12 # Empty main entry point.
13 .globl main
14 .p2align 4, 0x90
15 .type main,@function
16 main:
17 retq
19 .size main, .-main
21 # Test R_X86_64_GOTPC64 handling. We want to check that the offset of the
22 # operand is the 64-bit delta to the start of the GOT.
23 # jitlink-check: decode_operand(test_gotpc64, 1) = \
24 # jitlink-check: _GLOBAL_OFFSET_TABLE_ - test_lg_pic_GOT
25 # jitlink-check: decode_operand(test_got64, 1) = \
26 # jitlink-check: got_addr(elf_lg_pic_reloc.o, named_data) - \
27 # jitlink-check: _GLOBAL_OFFSET_TABLE_
28 .globl test_lg_pic_GOT
29 .p2align 4, 0x90
30 .type test_lg_pic_GOT,@function
31 test_lg_pic_GOT:
32 .L0$pb:
33 leaq .L0$pb(%rip), %rax
35 .globl test_gotpc64
36 test_gotpc64:
37 movabsq $_GLOBAL_OFFSET_TABLE_-.L0$pb, %rcx
38 .size test_gotpc64, .-test_gotpc64
40 addq %rax, %rcx
41 .globl test_got64
42 test_got64:
43 movabsq $named_data@GOT, %rax
44 .size test_got64, .-test_got64
46 .size test_lg_pic_GOT, .-test_lg_pic_GOT
48 .data
50 .type named_data,@object
51 .p2align 3
52 named_data:
53 .quad 42
54 .size named_data, 8
56 .ident "clang version 10.0.0-4ubuntu1 "
57 .section ".note.GNU-stack","",@progbits
58 .addrsig