aboutsummaryrefslogtreecommitdiff
path: root/elf/rtld.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-05-19 23:18:44 +0000
committerUlrich Drepper <drepper@redhat.com>1998-05-19 23:18:44 +0000
commit310930c1b53bf795e62572d7b7f2fe384cbdc0d4 (patch)
tree38879c417f61b0cc8c81c16f7cb8d0f47f69fd60 /elf/rtld.c
parent685cb06a89cb7878c9b942bad0a9420226f546b0 (diff)
downloadglibc-310930c1b53bf795e62572d7b7f2fe384cbdc0d4.tar
glibc-310930c1b53bf795e62572d7b7f2fe384cbdc0d4.tar.gz
glibc-310930c1b53bf795e62572d7b7f2fe384cbdc0d4.tar.bz2
glibc-310930c1b53bf795e62572d7b7f2fe384cbdc0d4.zip
Update.
1998-05-19 23:08 Ulrich Drepper <drepper@cygnus.com> * elf/rtld.c: Recognize --ignore-rpath argument and set _dl_ignore_path variable using the value. * elf/ldsodefs.h: Declare _dl_ignore_path. * elf/dl-load.c (decompose_rpath): Compare name of handled shared object against list in _dl_ignore_path and ignore RPATH if on the list. * elf/dl-support.c: Define _dl_ignore_path for static binaries. * iconvdata/run-iconv-test.sh: Call ld.so with --ignore-rpath parameter to make sure we get the correct helper libraries loaded. * elf/dl-load.c (decompose_rpath): Remove `room' parameter. Use "RPATH" string in call to fillin_rpath instead. (_dl_init_paths): Remove this parameter from call to decompose_rpath.
Diffstat (limited to 'elf/rtld.c')
-rw-r--r--elf/rtld.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index 75012e3f20..51a295cfb2 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -81,6 +81,8 @@ int _dl_debug_symbols;
int _dl_debug_versions;
int _dl_debug_reloc;
int _dl_debug_files;
+const char *_dl_ignore_rpath; /* RPATH values which should be
+ ignored. */
/* Set nonzero during loading and initialization of executable and
libraries, cleared before the executable's entry point runs. This
@@ -334,8 +336,7 @@ dl_main (const ElfW(Phdr) *phdr,
--_dl_argc;
++_dl_argv;
}
- else if (! strcmp (_dl_argv[1], "--library-path")
- && _dl_argc > 2)
+ else if (! strcmp (_dl_argv[1], "--library-path") && _dl_argc > 2)
{
library_path = _dl_argv[2];
@@ -343,6 +344,14 @@ dl_main (const ElfW(Phdr) *phdr,
_dl_argc -= 2;
_dl_argv += 2;
}
+ else if (! strcmp (_dl_argv[1], "--ignore-rpath") && _dl_argc > 2)
+ {
+ _dl_ignore_rpath = _dl_argv[2];
+
+ _dl_skip_args += 2;
+ _dl_argc -= 2;
+ _dl_argv += 2;
+ }
else
break;
@@ -367,7 +376,8 @@ of this helper program; chances are you did not intend to run this program.\n\
--verify verify that given object really is a dynamically linked\n\
object we get handle\n\
--library-path PATH use given PATH instead of content of the environment\n\
- variable LD_LIBRARY_PATH\n",
+ variable LD_LIBRARY_PATH\n\
+ --ignore-rpath LIST ignore RPATH information in object names in LIST\n",
NULL);
++_dl_skip_args;