summaryrefslogtreecommitdiff
path: root/lib/libkvm/kvm_private.h
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2017-12-14 17:06:34 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2017-12-14 17:06:34 +0000
commit847ce87541972f72ba7dfee743b65ebed06ebaf4 (patch)
tree3033297618e8c096cab7c554ae2c994d5df66163 /lib/libkvm/kvm_private.h
parentc248540ee09eeb4a1daefdd1cc61490ceecafaf8 (diff)
Add Symbols.map to explicitly define the ABIs, hiding linker defined symbols.
Use hidden aliases for internal invocations of exported symbols to avoid PLT. ok deraadt@ kettenis@ jca@
Diffstat (limited to 'lib/libkvm/kvm_private.h')
-rw-r--r--lib/libkvm/kvm_private.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/libkvm/kvm_private.h b/lib/libkvm/kvm_private.h
index b42634ba969..3fe186e7365 100644
--- a/lib/libkvm/kvm_private.h
+++ b/lib/libkvm/kvm_private.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: kvm_private.h,v 1.24 2015/09/04 02:55:09 dlg Exp $ */
+/* $OpenBSD: kvm_private.h,v 1.25 2017/12/14 17:06:33 guenther Exp $ */
/* $NetBSD: kvm_private.h,v 1.7 1996/05/05 04:32:15 gwr Exp $ */
/*-
@@ -106,3 +106,11 @@ void _kvm_syserr(kvm_t *kd, const char *program, const char *fmt, ...)
ssize_t _kvm_pread(kvm_t *, int, void *, size_t, off_t);
ssize_t _kvm_pwrite(kvm_t *, int, const void *, size_t, off_t);
__END_HIDDEN_DECLS
+
+
+#define PROTO(x) __dso_hidden typeof(x) x asm("__"#x)
+#define DEF(x) __strong_alias(x, __##x)
+
+PROTO(kvm_close);
+PROTO(kvm_nlist);
+PROTO(kvm_read);