From b98414732d230c236b9a79c709c2b035ca67be12 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 25 Jan 2016 18:55:35 -0500 Subject: move dlinfo out of dynlink.c --- src/ldso/dlinfo.c | 14 ++++++++++++-- src/ldso/dynlink.c | 14 -------------- 2 files changed, 12 insertions(+), 16 deletions(-) (limited to 'src/ldso') diff --git a/src/ldso/dlinfo.c b/src/ldso/dlinfo.c index 63d276d4..a173d1ac 100644 --- a/src/ldso/dlinfo.c +++ b/src/ldso/dlinfo.c @@ -1,9 +1,19 @@ #define _GNU_SOURCE #include -int __dlinfo(void *, int, void *); +__attribute__((__visibility__("hidden"))) +int __dl_invalid_handle(void *); + +__attribute__((__visibility__("hidden"))) +void __dl_seterr(const char *, ...); int dlinfo(void *dso, int req, void *res) { - return __dlinfo(dso, req, res); + if (__dl_invalid_handle(dso)) return -1; + if (req != RTLD_DI_LINKMAP) { + __dl_seterr("Unsupported request %d", req); + return -1; + } + *(struct link_map **)res = dso; + return 0; } diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c index d2c5c3f6..2598063e 100644 --- a/src/ldso/dynlink.c +++ b/src/ldso/dynlink.c @@ -1926,20 +1926,6 @@ void *__dlsym(void *restrict p, const char *restrict s, void *restrict ra) } #endif -__attribute__((__visibility__("hidden"))) -int __dl_invalid_handle(void *); - -int __dlinfo(void *dso, int req, void *res) -{ - if (__dl_invalid_handle(dso)) return -1; - if (req != RTLD_DI_LINKMAP) { - error("Unsupported request %d", req); - return -1; - } - *(struct link_map **)res = dso; - return 0; -} - __attribute__((__visibility__("hidden"))) void __dl_vseterr(const char *, va_list); -- cgit v1.2.3-70-g09d2