brintos

brintos / llvm-project-archived public Read only

0
0
Text · 599 B · f114476 Raw
26 lines · plain
1// RUN: %clang %cflags -o %t %s2// RUN: llvm-bolt -o %t.bolt %t3// RUN: llvm-readelf -x .data %t.bolt | FileCheck %s4 5  .text6  .option norvc7  .globl _start8  .p2align 19_start:10  // Force BOLT into relocation mode11  .reloc 0, R_RISCV_NONE12  // BOLT removes this nop so the label difference is initially 8 but should be13  // 4 after BOLT processes it.14  nop15  beq x0, x0, _test_end16_test_end:17  ret18  .size _start, .-_start19 20  .data21// CHECK: Hex dump of section '.data':22// CHECK: 0x{{.*}} 0400000023  .reloc ., R_RISCV_ADD32, _test_end24  .reloc ., R_RISCV_SUB32, _start25  .word _test_end - _start26