Fix dynamic.c segmentation fault
Make dlopen() use cwd. Without this fix the program will get a segmentation fault, as dlopen() will return NULL, and dlerror() diagnoses: Failed to load fn.so: fn.so: cannot open shared object file: No such file or directory man dlopen says: If filename contains a slash ("/"), then it is interpreted as a (relative or absolute) pathname (**what we want**). Otherwise, the dynamic linker searches for the object as follows… (*lists several options that don't for the cwd unless you set up env vars*)
Showing
想要评论请 注册 或 登录