mirror of
https://github.com/LSPosed/LSPlt.git
synced 2025-05-06 21:48:48 +08:00
Support riscv
This commit is contained in:
parent
f6e06cddd2
commit
1753201301
@ -21,6 +21,10 @@
|
||||
#define ELF_R_GENERIC_JUMP_SLOT R_X86_64_JUMP_SLOT
|
||||
#define ELF_R_GENERIC_GLOB_DAT R_X86_64_GLOB_DAT
|
||||
#define ELF_R_GENERIC_ABS R_X86_64_64
|
||||
#elif defined(__riscv)
|
||||
#define ELF_R_GENERIC_JUMP_SLOT R_RISCV_JUMP_SLOT
|
||||
#define ELF_R_GENERIC_GLOB_DAT R_RISCV_32_PCREL
|
||||
#define ELF_R_GENERIC_ABS R_RISCV_64
|
||||
#endif
|
||||
|
||||
#if defined(__LP64__)
|
||||
@ -81,6 +85,8 @@ Elf::Elf(uintptr_t base_addr) : base_addr_(base_addr) {
|
||||
if (EM_386 != header_->e_machine) return;
|
||||
#elif defined(__x86_64__)
|
||||
if (EM_X86_64 != header_->e_machine) return;
|
||||
#elif defined(__riscv)
|
||||
if (EM_RISCV != header_->e_machine) return;
|
||||
#else
|
||||
return;
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user