diff options
author | kib <kib@FreeBSD.org> | 2009-03-18 13:40:37 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2009-03-18 13:40:37 +0000 |
commit | 46713086a1c3b7565c0b42b823b0d6d209228ce6 (patch) | |
tree | 9d700a91b55e52d5b6d842c395e7ab28b6ce8887 /libexec/rtld-elf/map_object.c | |
parent | 79dc1e1db1fbb85a54246a49fcbe3b7e532680c1 (diff) | |
download | FreeBSD-src-46713086a1c3b7565c0b42b823b0d6d209228ce6.zip FreeBSD-src-46713086a1c3b7565c0b42b823b0d6d209228ce6.tar.gz |
Implement the dynamic string token substitution in the rpath and
soneeded pathes. The $ORIGIN, $OSNAME, $OSREL and $PLATFORM tokens
are supported. Enabling the substitution requires DF_ORIGIN flag in
DT_FLAGS or DF_1_ORIGIN if DF_FLAGS_1, that may be set with -z origin
gnu ld flag. Translation is unconditionally disabled for setuid/setgid
processes.
The $ORIGIN translation relies on the AT_EXECPATH auxinfo supplied
by kernel.
Requested by: maho
Tested by: maho, pho
Reviewed by: kan
Diffstat (limited to 'libexec/rtld-elf/map_object.c')
-rw-r--r-- | libexec/rtld-elf/map_object.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libexec/rtld-elf/map_object.c b/libexec/rtld-elf/map_object.c index f489edd..2d06074 100644 --- a/libexec/rtld-elf/map_object.c +++ b/libexec/rtld-elf/map_object.c @@ -348,6 +348,8 @@ obj_free(Obj_Entry *obj) free(obj->vertab); if (obj->origin_path) free(obj->origin_path); + if (obj->z_origin) + free(obj->rpath); if (obj->priv) free(obj->priv); if (obj->path) |