Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: fusl/src/ldso/dlinfo.c

Issue 1689833004: [fusl] Update fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: remove stray space Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fusl/src/ldso/dlerror.c ('k') | fusl/src/ldso/dlopen.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fusl/src/ldso/dlinfo.c
diff --git a/fusl/src/ldso/dlinfo.c b/fusl/src/ldso/dlinfo.c
index 63d276d408e34fe667476f43dd41bdf8da0deb4f..a173d1ac63ef1294decefa6b00db9a9bd7f35ce6 100644
--- a/fusl/src/ldso/dlinfo.c
+++ b/fusl/src/ldso/dlinfo.c
@@ -1,9 +1,19 @@
#define _GNU_SOURCE
#include <dlfcn.h>
-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;
}
« no previous file with comments | « fusl/src/ldso/dlerror.c ('k') | fusl/src/ldso/dlopen.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698