Merge "Add riscv64 support to the linker relocation benchmark." am: 56c4db9aeb

Original change: https://android-review.googlesource.com/c/platform/bionic/+/2302559

Change-Id: I805c2f1bbf24a3e64a95411ee7060628c84f4c4c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Elliott Hughes 2022-11-15 16:57:10 +00:00 committed by Automerger Merge Worker
commit d93bf64f95

View file

@ -42,6 +42,15 @@
#define DATA_WORD(val) .quad val
#define MAIN .globl main; main: mov w0, wzr; ret
#elif defined(__riscv)
// No `lga` in clang unless https://reviews.llvm.org/D107278 lands.
// `la` is equivalent when using PIC (which we do) though.
#define GOT_RELOC(sym) la a0, sym
#define CALL(sym) call sym@plt
#define DATA_WORD(val) .quad val
#define MAIN .globl main; main: li a0, 0; ret
#elif defined(__i386__)
#define GOT_RELOC(sym) .long sym@got