xref: /llvm-project/bolt/test/RISCV/tls-le-gnu-ld.test (revision c532ba4edd7ad7675ba450ba43268aa9e7bda46b)
1// This test checks that the binaries produces with GNU ld TLS le relaxation are
2// properly processed by BOLT. GNU ld currently emits two non-standard
3// relocations (R_RISCV_TPREL_I and R_RISCV_TPREL_S) in this case.
4
5// RUN: yaml2obj %p/Inputs/tls-le-gnu-ld.yaml &> %t.exe
6// RUN: llvm-bolt %t.exe -o %t.bolt.exe --print-cfg --print-only=_start \
7// RUN:   | FileCheck %s
8
9// CHECK: Binary Function "_start" after building cfg {
10// CHECK:      lw t0, 0x0(tp)
11// CHECK-NEXT: sw t0, 0x0(tp)
12