diff options
author | mari <_mari@tuta.io> | 2024-08-30 21:07:24 +0800 |
---|---|---|
committer | mari <_mari@tuta.io> | 2024-08-30 21:07:24 +0800 |
commit | ba006852eb83e920b8f5fe9d0a17013b70dde212 (patch) | |
tree | 6b1248d78929ab17397addde38344d27b3e1d92d /libgcompat | |
parent | 9a75570c55def665acb935d8ca903bbca65b82d2 (diff) | |
download | gcompat-ba006852eb83e920b8f5fe9d0a17013b70dde212.tar.gz gcompat-ba006852eb83e920b8f5fe9d0a17013b70dde212.tar.bz2 gcompat-ba006852eb83e920b8f5fe9d0a17013b70dde212.tar.xz gcompat-ba006852eb83e920b8f5fe9d0a17013b70dde212.zip |
dladdr1 for libnvidia-eglcore, and libnvidia-glcore
Diffstat (limited to 'libgcompat')
-rw-r--r-- | libgcompat/dlfcn.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libgcompat/dlfcn.c b/libgcompat/dlfcn.c index f2eaa45..603336c 100644 --- a/libgcompat/dlfcn.c +++ b/libgcompat/dlfcn.c @@ -23,3 +23,19 @@ void *dlvsym(void *handle, char *symbol, char *version) return dlsym(handle, symbol); } + +int dladdr1(const void *addr, Dl_info *info, void **extra_info, int flags) +{ + if (getenv("GLIBC_FAKE_DEBUG") != NULL) { + fprintf(stderr, "request info of %p with flags %d", addr, + flags); + } + + switch (flags) { + case 1 /* RTLD_DL_SYMEMT */: + case 2 /* RTLD_DL_LINKMAP */: + return 0; + default: + return dladdr(addr, info); + } +} |