mirror of
git://git.musl-libc.org/musl
synced 2025-03-06 20:48:29 +01:00
change ldso path file logic to replace rather than add to search path
this change was originally intended just to avoid repeated attempts to open a nonexistant /etc/ls-musl-$(ARCH).path file, but I realized it also prevents the default paths from being searched when such a path file exists. despite the potential to break existing usage, I believe the new behavior is the right behavior, and it's better to fix it sooner rather than later. with the old behavior, it was impossible to inhibit search of default paths which might contain musl-incompatible libs (or even libs from a different cpu arch, on multi-arch machines).
This commit is contained in:
parent
3d9e3a309f
commit
40d5f7eb83
1 changed files with 2 additions and 2 deletions
|
@ -483,8 +483,8 @@ static struct dso *load_library(const char *name)
|
|||
fclose(f);
|
||||
}
|
||||
}
|
||||
if (sys_path) fd = path_open(name, sys_path, buf, sizeof buf);
|
||||
else fd = path_open(name, "/lib:/usr/local/lib:/usr/lib", buf, sizeof buf);
|
||||
if (!sys_path) sys_path = "/lib:/usr/local/lib:/usr/lib";
|
||||
fd = path_open(name, sys_path, buf, sizeof buf);
|
||||
}
|
||||
pathname = buf;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue