From: guenther Date: Sun, 16 Jan 2022 02:17:05 +0000 (+0000) Subject: Nothing depends on archdep.h pulling in other #includes anymore, X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b0a1b81927f54db87cce1570504f8edb7e03695f;p=openbsd Nothing depends on archdep.h pulling in other #includes anymore, so delete the #includes and hide the RELOC_* functions that are only used by lib/csu behind "#ifdef RCRT0" ok jca@ --- diff --git a/libexec/ld.so/riscv64/archdep.h b/libexec/ld.so/riscv64/archdep.h index ec29775dc74..5e090c73a82 100644 --- a/libexec/ld.so/riscv64/archdep.h +++ b/libexec/ld.so/riscv64/archdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: archdep.h,v 1.3 2021/11/14 22:07:39 guenther Exp $ */ +/* $OpenBSD: archdep.h,v 1.4 2022/01/16 02:17:05 guenther Exp $ */ /* * Copyright (c) 2021 Dale Rahn @@ -33,15 +33,11 @@ #define RELOC_TAG DT_RELA #define MACHID EM_RISCV /* ELF e_machine ID value checked */ -#include -#include -#include "syscall.h" -#include "util.h" - - /* Only used in lib/csu/boot.h */ +#ifdef RCRT0 + static inline void -RELOC_DYN(Elf_RelA *r, const Elf_Sym *s, Elf_Addr *p, unsigned long v) +RELOC_DYN(const Elf_RelA *r, const Elf_Sym *s, Elf_Addr *p, unsigned long v) { if (ELF_R_TYPE(r->r_info) == R_RISCV_RELATIVE) { *p = v + r->r_addend; @@ -52,4 +48,5 @@ RELOC_DYN(Elf_RelA *r, const Elf_Sym *s, Elf_Addr *p, unsigned long v) } } +#endif /* RCRT0 */ #endif /* _AARCH64_ARCHDEP_H_ */