diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2019-05-04 05:53:18 +0200 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2019-05-04 05:53:18 +0200 |
commit | a0c6efb9fd23b8e9b44a123252afc863b88eb8d7 (patch) | |
tree | b64414625cb79ebfcce389cc35c87a9b3dfc91e8 /pkgs/build-support | |
parent | 6f7e06bd5a022d49972a92e7d317420fddd41a88 (diff) | |
download | nixlib-a0c6efb9fd23b8e9b44a123252afc863b88eb8d7.tar nixlib-a0c6efb9fd23b8e9b44a123252afc863b88eb8d7.tar.gz nixlib-a0c6efb9fd23b8e9b44a123252afc863b88eb8d7.tar.bz2 nixlib-a0c6efb9fd23b8e9b44a123252afc863b88eb8d7.tar.lz nixlib-a0c6efb9fd23b8e9b44a123252afc863b88eb8d7.tar.xz nixlib-a0c6efb9fd23b8e9b44a123252afc863b88eb8d7.tar.zst nixlib-a0c6efb9fd23b8e9b44a123252afc863b88eb8d7.zip |
libredirect: remove dlopen support
While it might be useful in some cases, there are too many caveats to be worth it. When libredirect intercepts dlopen call and calls the original function, the dynamic loader will use libredirect.so's DT_RUNPATH entry instead of the one from the ELF file the dlopen call originated from. That means that when program tries to dlopen a library that it expects to find on its RPATH, the call will fail. This broke Sublime Text for just that reason.
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/libredirect/libredirect.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/pkgs/build-support/libredirect/libredirect.c b/pkgs/build-support/libredirect/libredirect.c index dcf3a2016bc2..655399af58f5 100644 --- a/pkgs/build-support/libredirect/libredirect.c +++ b/pkgs/build-support/libredirect/libredirect.c @@ -166,10 +166,3 @@ int execv(const char *path, char *const argv[]) char buf[PATH_MAX]; return execv_real(rewrite(path, buf), argv); } - -void *dlopen(const char *filename, int flag) -{ - void * (*__dlopen_real) (const char *, int) = dlsym(RTLD_NEXT, "dlopen"); - char buf[PATH_MAX]; - return __dlopen_real(rewrite(filename, buf), flag); -} |