summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2004-10-17 20:24:07 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2004-10-17 20:24:07 +0000
commitee9ebb877e4b54f13e03b0aea8679e04c928043f (patch)
tree0c9e5ef131f48074741c9c2b5c63af1b626d8695
parent42af06566c02c28d0dd2e288798457774f614efe (diff)
Expose dl_iterate_phdr.
ok drahn@, millert@
-rw-r--r--lib/libc/dlfcn/dlfcn_stubs.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/libc/dlfcn/dlfcn_stubs.c b/lib/libc/dlfcn/dlfcn_stubs.c
index 430cd9d65fa..d3898df0edb 100644
--- a/lib/libc/dlfcn/dlfcn_stubs.c
+++ b/lib/libc/dlfcn/dlfcn_stubs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dlfcn_stubs.c,v 1.8 2004/08/11 19:14:56 drahn Exp $ */
+/* $OpenBSD: dlfcn_stubs.c,v 1.9 2004/10/17 20:24:06 kettenis Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -26,6 +26,8 @@
*
*/
+#include <stddef.h>
+
/*
* All functions here are just stubs that will be overridden
* by the real functions in ld.so when dynamic loading is
@@ -41,6 +43,9 @@ int dlctl(void *handle, int command, void *data) __attribute__((weak));
const char * dlerror(void) __attribute__((weak));
int dladdr(const void *addr, void *info) __attribute__((weak));
+struct dl_phdr_info;
+int dl_iterate_phdr(int (*callback)(struct dl_phdr_info *, size_t, void *), void *date) __attribute__((weak));
+
#include <stdio.h>
void *
@@ -77,6 +82,13 @@ dlerror(void)
}
int
+dl_iterate_phdr(int (*callback)(struct dl_phdr_info *, size_t, void *),
+ void *data)
+{
+ return -1;
+}
+
+int
dladdr(const void *addr, void *info)
{
printf("Wrong dl symbols!\n");