1# REQUIRES: riscv 2# RUN: llvm-mc -filetype=obj -triple=riscv32 %s -o %t.32.o 3# RUN: ld.lld -pie %t.32.o -o %t.32 4# RUN: llvm-readelf -s %t.32 | FileCheck --check-prefix=SYM %s 5 6# RUN: llvm-mc -filetype=obj -triple=riscv64 %s -o %t.64.o 7# RUN: ld.lld -pie %t.64.o -o %t.64 8# RUN: llvm-readelf -s %t.64 | FileCheck --check-prefix=SYM %s 9 10## If there is an undefined reference to __global_pointer$ but .sdata doesn't 11## exist, define __global_pointer$ and set its st_shndx arbitrarily to 1. 12 13# SYM: {{0*}}00000800 0 NOTYPE GLOBAL DEFAULT 1 __global_pointer$ 14 15lla gp, __global_pointer$ 16