• V
    Fix dynamic.c segmentation fault · c7033436
    Victor Cuadrado Juan 提交于
    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*)
    c7033436
dynamic.c 1.2 KB