Index: libexec/rtld-elf/rtld.c =================================================================== --- libexec/rtld-elf/rtld.c +++ libexec/rtld-elf/rtld.c @@ -1404,6 +1404,10 @@ if (obj->origin_path != NULL) return (true); obj->origin_path = xmalloc(PATH_MAX); + if (obj->path[0] == '#') { + strncpy(obj->origin_path, obj->path, strchr(obj->path, '/') - obj->path); + return true; + } return (rtld_dirname_abs(obj->path, obj->origin_path) != -1); }