brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 01f9e7e Raw
35 lines · plain
1# RUN: rm -rf %t && mkdir -p %t2# RUN: llvm-mc -triple=riscv64 -mattr=+relax -filetype=obj \3# RUN:     -o %t/riscv64_reloc_add.o %s4# RUN: llvm-mc -triple=riscv32 -mattr=+relax -filetype=obj \5# RUN:     -o %t/riscv32_reloc_add.o %s6# RUN: llvm-jitlink -noexec -check %s %t/riscv64_reloc_add.o \7# RUN:     -slab-allocate=1Mb -slab-address=0x1000 -slab-page-size=0x10008# RUN: llvm-jitlink -noexec -check %s %t/riscv32_reloc_add.o \9# RUN:     -slab-allocate=1Mb -slab-address=0x1000 -slab-page-size=0x100010 11# jitlink-check: *{8}(named_data) = 0x812# jitlink-check: *{4}(named_data+8) = 0x813# jitlink-check: *{2}(named_data+12) = 0x814# jitlink-check: *{1}(named_data+14) = 0x815# jitlink-check: *{1}(named_data+15) = 0x816 17.global main18main:19.L0:20# Referencing named_data symbol to avoid the following .rodata section be skipped.21# This instruction will be expand to two instructions (auipc + ld).22  lw a0, named_data23.L1:24 25.section ".rodata","",@progbits26.type named_data,@object27named_data:28.reloc named_data+15, R_RISCV_SUB6, .L029.dword .L1 - .L030.word .L1 - .L031.half .L1 - .L032.byte .L1 - .L033.byte 0x834.size named_data, 1635