From: guenther Date: Tue, 9 Nov 2021 21:22:29 +0000 (+0000) Subject: Like most archs, riscv doesn't need resolution of JUMP_SLOT relocations X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9e6d8a17b5d020d52f965046837d54b005298173;p=openbsd Like most archs, riscv doesn't need resolution of JUMP_SLOT relocations in static PIE binaries: delete RELOC_JMPREL and HAVE_JMPREL there. ok kettenis@ --- diff --git a/libexec/ld.so/riscv64/archdep.h b/libexec/ld.so/riscv64/archdep.h index 2c191e9364a..604a76881d6 100644 --- a/libexec/ld.so/riscv64/archdep.h +++ b/libexec/ld.so/riscv64/archdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: archdep.h,v 1.1 2021/04/28 15:16:26 drahn Exp $ */ +/* $OpenBSD: archdep.h,v 1.2 2021/11/09 21:22:29 guenther Exp $ */ /* * Copyright (c) 2021 Dale Rahn @@ -31,7 +31,6 @@ #define _AARCH64_ARCHDEP_H_ #define RELOC_TAG DT_RELA -#define HAVE_JMPREL 1 #define MACHID EM_RISCV /* ELF e_machine ID value checked */ @@ -40,17 +39,6 @@ #include "syscall.h" #include "util.h" -static inline void -RELOC_JMPREL(Elf_RelA *r, const Elf_Sym *s, Elf_Addr *p, unsigned long v, - Elf_Addr *pltgot) -{ - if (ELF_R_TYPE(r->r_info) == R_RISCV_JUMP_SLOT) { - p[0] = v + s->st_value + r->r_addend; - } else { - _dl_exit(5); - } -} - static inline void RELOC_DYN(Elf_RelA *r, const Elf_Sym *s, Elf_Addr *p, unsigned long v) {