diff options
author | 2004-10-17 20:24:06 +0000 | |
---|---|---|
committer | 2004-10-17 20:24:06 +0000 | |
commit | cb86c0d6bd3e4f7846c2ab7870bb9f4ad7f99abd (patch) | |
tree | aca68efee32b2ac7c7e185c695ac68729e4cdd92 /lib/libc | |
parent | Replace ifdef NATM with if NATM > 0 (diff) | |
download | wireguard-openbsd-cb86c0d6bd3e4f7846c2ab7870bb9f4ad7f99abd.tar.xz wireguard-openbsd-cb86c0d6bd3e4f7846c2ab7870bb9f4ad7f99abd.zip |
Expose dl_iterate_phdr.
ok drahn@, millert@
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/dlfcn/dlfcn_stubs.c | 14 |
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"); |