From 2a697c882262c556298185cd65405ceb2c213424 Mon Sep 17 00:00:00 2001 From: guenther Date: Sun, 16 Jan 2022 02:16:40 +0000 Subject: [PATCH] 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 kettenis@ --- libexec/ld.so/powerpc64/archdep.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libexec/ld.so/powerpc64/archdep.h b/libexec/ld.so/powerpc64/archdep.h index b3427e454da..b27d9a74c49 100644 --- a/libexec/ld.so/powerpc64/archdep.h +++ b/libexec/ld.so/powerpc64/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:16:40 guenther Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -32,12 +32,10 @@ #define RELOC_TAG DT_RELA #define MACHID EM_PPC64 /* ELF e_machine ID value checked */ -#include -#include -#include "syscall.h" -#include "util.h" +#ifdef RCRT0 +/* currently only used by RELOC_DYN() below */ static inline void _dl_dcbf(Elf_Addr *addr) { @@ -51,7 +49,7 @@ _dl_dcbf(Elf_Addr *addr) /* Only used in lib/csu/boot.h */ 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_PPC64_RELATIVE) { *p = v + r->r_addend; @@ -74,4 +72,5 @@ RELOC_DYN(Elf_RelA *r, const Elf_Sym *s, Elf_Addr *p, unsigned long v) } } +#endif /* RCRT0 */ #endif /* _POWERPC_ARCHDEP_H_ */ -- 2.20.1