Allow to specify targets by absolute paths in libmap.conf.
Submitted by: Tatu Kilappa <tatu.kilappa@iki.fi> PR: 221032 MFC after: 2 weeks
This commit is contained in:
parent
1d9aaa862b
commit
dd269a0bf4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=321607
@ -1590,20 +1590,21 @@ find_library(const char *xname, const Obj_Entry *refobj, int *fdp)
|
|||||||
bool nodeflib, objgiven;
|
bool nodeflib, objgiven;
|
||||||
|
|
||||||
objgiven = refobj != NULL;
|
objgiven = refobj != NULL;
|
||||||
if (strchr(xname, '/') != NULL) { /* Hard coded pathname */
|
|
||||||
if (xname[0] != '/' && !trust) {
|
|
||||||
_rtld_error("Absolute pathname required for shared object \"%s\"",
|
|
||||||
xname);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return (origin_subst(__DECONST(Obj_Entry *, refobj),
|
|
||||||
__DECONST(char *, xname)));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (libmap_disable || !objgiven ||
|
if (libmap_disable || !objgiven ||
|
||||||
(name = lm_find(refobj->path, xname)) == NULL)
|
(name = lm_find(refobj->path, xname)) == NULL)
|
||||||
name = (char *)xname;
|
name = (char *)xname;
|
||||||
|
|
||||||
|
if (strchr(name, '/') != NULL) { /* Hard coded pathname */
|
||||||
|
if (name[0] != '/' && !trust) {
|
||||||
|
_rtld_error("Absolute pathname required for shared object \"%s\"",
|
||||||
|
name);
|
||||||
|
return (NULL);
|
||||||
|
}
|
||||||
|
return (origin_subst(__DECONST(Obj_Entry *, refobj),
|
||||||
|
__DECONST(char *, name)));
|
||||||
|
}
|
||||||
|
|
||||||
dbg(" Searching for \"%s\"", name);
|
dbg(" Searching for \"%s\"", name);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user