From 61e0617ac34c4daaeb2f07f89a05c9f9353b8879 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 19 Feb 1999 00:00:05 +0000 Subject: Update. * elf/link.h (link_map): Add l_dev and l_ino. * elf/dl-load.c (_dl_map_object_from_fd): Test dev/ino of newly loaded shared object with all laoded objects. Initialize l_ino and l_dev in case it's new. * elf/rtld.c (dl_main): Explain situation is l_dev/l_ino with main object. * elf/Makefile: Compile and run new test. * elf/multiload.c: New file. --- elf/rtld.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'elf/rtld.c') diff --git a/elf/rtld.c b/elf/rtld.c index df6a945..6aa3a65 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -461,7 +461,7 @@ of this helper program; chances are you did not intend to run this program.\n\ HP_TIMING_NOW (start); _dl_map_object (NULL, _dl_argv[0], 0, lt_library, 0); HP_TIMING_NOW (stop); - + HP_TIMING_DIFF (load_time, start, stop); } @@ -486,6 +486,21 @@ of this helper program; chances are you did not intend to run this program.\n\ _dl_loaded->l_entry = *user_entry; _dl_loaded->l_opencount = 1; + /* At this point we are in a bit of trouble. We would have to + fill in the values for l_dev and l_ino. But in general we + do not know where the file is. We also do not handle AT_EXECFD + even if it would be passed up. + + We leave the values here defined to 0. This is normally no + problem as the program code itself is normally no shared + object and therefore cannot be loaded dynamically. Nothing + prevent the use of dynamic binaries and in these situations + we might get problems. We might not be able to find out + whether the object is already loaded. But since there is no + easy way out and because the dynamic binary must also not + have an SONAME we ignore this program for now. If it becomes + a problem we can force people using SONAMEs. */ + /* We delay initializing the path structure until we got the dynamic information for the program. */ } -- cgit v1.1