mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 13:57:10 +03:00
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.
This commit is contained in:
parent
6f7e06bd5a
commit
a0c6efb9fd
@ -166,10 +166,3 @@ int execv(const char *path, char *const argv[])
|
|||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
return execv_real(rewrite(path, buf), argv);
|
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);
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user