From 209fd89a2810419309944f10d11834321f0ebb25 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Thu, 14 Nov 2024 05:54:24 +0200 Subject: [PATCH] _dl_iterate_phdr_locked(): fix libc and libdl Add prototype. Export from libdl. Fixes: 1426fd6cff0603f0ee275b99f2ba35dc36f3d0c2 Reviewed by: kevans Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D47563 --- lib/libc/gen/dlfcn.c | 2 ++ lib/libdl/Symbol.map | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/lib/libc/gen/dlfcn.c b/lib/libc/gen/dlfcn.c index b814fdc845c4..bffee3952e0d 100644 --- a/lib/libc/gen/dlfcn.c +++ b/lib/libc/gen/dlfcn.c @@ -204,6 +204,8 @@ dl_init_phdr_info(void) #endif #pragma weak _dl_iterate_phdr_locked +int _dl_iterate_phdr_locked(int (*callback)(struct dl_phdr_info *, + size_t, void *), void *data); int _dl_iterate_phdr_locked( int (*callback)(struct dl_phdr_info *, size_t, void *) __unused, diff --git a/lib/libdl/Symbol.map b/lib/libdl/Symbol.map index dd9a8252e4a3..f0e03c4940ce 100644 --- a/lib/libdl/Symbol.map +++ b/lib/libdl/Symbol.map @@ -22,3 +22,7 @@ FBSD_1.8 { rtld_get_var; rtld_set_var; }; + +FBSDprivate_1.0 { + _dl_iterate_phdr_locked; +};