diff options
author | Roland McGrath <roland@gnu.org> | 2002-10-14 01:06:59 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2002-10-14 01:06:59 +0000 |
commit | 27af5372488283ad601bf1abf3b4433f994065c4 (patch) | |
tree | 04921e87e80974247af1c37965553bc7e6e9e4ad /elf/dl-load.c | |
parent | 747bf98ea9d04ea68e61510f955276da5704d7fc (diff) | |
download | glibc-27af5372488283ad601bf1abf3b4433f994065c4.tar.gz glibc-27af5372488283ad601bf1abf3b4433f994065c4.tar.xz glibc-27af5372488283ad601bf1abf3b4433f994065c4.zip |
* elf/dl-load.c (_dl_dst_count, _dl_dst_substitute): Handle $LIB
dynamic string tag. * elf/Makefile ($(objpfx)trusted-dirs.st): Make the output define DL_DST_LIB based on $(slibdir).
Diffstat (limited to 'elf/dl-load.c')
-rw-r--r-- | elf/dl-load.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c index e1909ca6bf..db9391ea66 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -202,8 +202,8 @@ _dl_dst_count (const char *name, int is_path) ++name; if ((len = is_dst (start, name, "ORIGIN", is_path, INTUSE(__libc_enable_secure))) != 0 - || ((len = is_dst (start, name, "PLATFORM", is_path, 0)) - != 0)) + || (len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0 + || (len = is_dst (start, name, "LIB", is_path, 0)) != 0) ++cnt; name = strchr (name + len, '$'); @@ -239,9 +239,10 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result, if ((len = is_dst (start, name, "ORIGIN", is_path, INTUSE(__libc_enable_secure))) != 0) repl = l->l_origin; - else if ((len = is_dst (start, name, "PLATFORM", is_path, - 0)) != 0) + else if ((len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0) repl = GL(dl_platform); + else if ((len = is_dst (start, name, "LIB", is_path, 0)) != 0) + repl = DL_DST_LIB; if (repl != NULL && repl != (const char *) -1) { |