summaryrefslogtreecommitdiff
path: root/libexec/ld.so/amd64
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2022-01-08 06:49:43 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2022-01-08 06:49:43 +0000
commitba97351d70b8dee88da1dc316d9a27f1b65a8a21 (patch)
treeb01b0aca8ac8f735f9c9a31a6d29c5b5d27ad5b5 /libexec/ld.so/amd64
parent027d6602241289b8bb7fc17d163d51a2f88babaf (diff)
Prep .c files for removing the #includes from */archdep.h
* replace #include "archdep.h" with #includes of what is used, pulling in "syscall.h", "util.h", and "archdep.h" as needed * delete #include <sys/syscall.h> from syscall.h * only pull in <sys/stat.h> to the three files that use _dl_fstat(), forward declare struct stat in syscall.h for the others * NBBY is for <sys/select.h> macros; just use '8' in dl_printf.c * <machine/vmparam.h> is only needed on i386; conditionalize it * stop using __LDPGSZ: use _MAX_PAGE_SHIFT (already used by malloc.c) where necessary * delete other bogus #includes, order legit per style: <sys/*> then <*/*>, then <*>, then "*" dir.c improvement from jsg@ ok and testing assistance deraadt@
Diffstat (limited to 'libexec/ld.so/amd64')
-rw-r--r--libexec/ld.so/amd64/rtld_machine.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/libexec/ld.so/amd64/rtld_machine.c b/libexec/ld.so/amd64/rtld_machine.c
index e36b29d2f6b..6c8e9da1cb3 100644
--- a/libexec/ld.so/amd64/rtld_machine.c
+++ b/libexec/ld.so/amd64/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.39 2019/12/07 22:57:47 guenther Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.40 2022/01/08 06:49:41 guenther Exp $ */
/*
* Copyright (c) 2002,2004 Dale Rahn
@@ -66,15 +66,13 @@
#define _DYN_LOADER
#include <sys/types.h>
-#include <sys/mman.h>
+#include <sys/exec_elf.h>
#include <sys/syscall.h>
#include <sys/unistd.h>
-#include <nlist.h>
-#include <link.h>
+#include <machine/reloc.h>
-#include "syscall.h"
-#include "archdep.h"
+#include "util.h"
#include "resolve.h"
int64_t pcookie __attribute__((section(".openbsd.randomdata"))) __dso_hidden;