summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2017-01-23 11:04:19 +0000
committerguenther <guenther@openbsd.org>2017-01-23 11:04:19 +0000
commit183d81b211c3ba7a2ca68dd2c13a90e163772c84 (patch)
tree845c07d28d6daba6772b009326c73a74e5f16e6e
parentsync (diff)
downloadwireguard-openbsd-183d81b211c3ba7a2ca68dd2c13a90e163772c84.tar.xz
wireguard-openbsd-183d81b211c3ba7a2ca68dd2c13a90e163772c84.zip
Wrap function declarations with __{BEGIN,END}_HIDDEN_DECLS to reduce
relocations inside ld.so that it has to bootstrap ok kettenis@
-rw-r--r--libexec/ld.so/dir.h4
-rw-r--r--libexec/ld.so/path.h4
-rw-r--r--libexec/ld.so/sod.h4
-rw-r--r--libexec/ld.so/util.h4
4 files changed, 12 insertions, 4 deletions
diff --git a/libexec/ld.so/dir.h b/libexec/ld.so/dir.h
index fa3f8dc2a31..f1e0a42d7fa 100644
--- a/libexec/ld.so/dir.h
+++ b/libexec/ld.so/dir.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dir.h,v 1.3 2012/03/21 04:28:45 matthew Exp $ */
+/* $OpenBSD: dir.h,v 1.4 2017/01/23 11:04:19 guenther Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -31,6 +31,8 @@
typedef struct _dl_dirdesc _dl_DIR;
+__BEGIN_HIDDEN_DECLS
_dl_DIR *_dl_opendir(const char *name);
int _dl_closedir(_dl_DIR *dirp);
struct dirent *_dl_readdir(_dl_DIR *dirp);
+__END_HIDDEN_DECLS
diff --git a/libexec/ld.so/path.h b/libexec/ld.so/path.h
index e8bf9fdd613..6f2b2e705a3 100644
--- a/libexec/ld.so/path.h
+++ b/libexec/ld.so/path.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: path.h,v 1.1 2013/03/20 21:49:59 kurt Exp $ */
+/* $OpenBSD: path.h,v 1.2 2017/01/23 11:04:19 guenther Exp $ */
/*
* Copyright (c) 2013 Kurt Miller <kurt@intricatesoftware.com>
@@ -19,7 +19,9 @@
#ifndef __DL_PATH_H__
#define __DL_PATH_H__
+__BEGIN_HIDDEN_DECLS
char ** _dl_split_path(const char *searchpath);
void _dl_free_path(char **path);
+__END_HIDDEN_DECLS
#endif /*__DL_PATH_H__*/
diff --git a/libexec/ld.so/sod.h b/libexec/ld.so/sod.h
index 325c46cd855..ce60ac30fd9 100644
--- a/libexec/ld.so/sod.h
+++ b/libexec/ld.so/sod.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sod.h,v 1.3 2013/03/20 21:49:59 kurt Exp $ */
+/* $OpenBSD: sod.h,v 1.4 2017/01/23 11:04:19 guenther Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -31,7 +31,9 @@
*
*/
+__BEGIN_HIDDEN_DECLS
void _dl_build_sod(const char *name, struct sod *sodp);
void _dl_set_sod(const char *, struct sod *);
char *_dl_findhint(char *name, int major, int minor, char *prefered_path);
extern char **_dl_hint_search_path;
+__END_HIDDEN_DECLS
diff --git a/libexec/ld.so/util.h b/libexec/ld.so/util.h
index 6c80ad8855b..7fc71dc54c1 100644
--- a/libexec/ld.so/util.h
+++ b/libexec/ld.so/util.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.h,v 1.28 2016/08/27 03:52:25 guenther Exp $ */
+/* $OpenBSD: util.h,v 1.29 2017/01/23 11:04:19 guenther Exp $ */
/*
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -35,6 +35,7 @@
#include <stdarg.h>
#include <stddef.h> /* for NULL */
+__BEGIN_HIDDEN_DECLS
void *_dl_malloc(size_t size);
void *_dl_calloc(size_t nmemb, const size_t size);
void *_dl_realloc(void *, size_t size);
@@ -55,6 +56,7 @@ char *_dl_realpath(const char *path, char *resolved);
int _dl_uname(struct utsname *name);
long _dl_strtol(const char *nptr, char **endptr, int base);
+__END_HIDDEN_DECLS
#define _dl_round_page(x) (((x) + (__LDPGSZ - 1)) & ~(__LDPGSZ - 1))