about summary refs log tree commit diff
path: root/elf/rtld.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-02-19 00:00:05 +0000
committerUlrich Drepper <drepper@redhat.com>1999-02-19 00:00:05 +0000
commit61e0617ac34c4daaeb2f07f89a05c9f9353b8879 (patch)
tree8dc1f2e00b67c6661892258bf2d479e793854c54 /elf/rtld.c
parent1a989e004c00955e60cd315666ebd450d6fa9732 (diff)
downloadglibc-61e0617ac34c4daaeb2f07f89a05c9f9353b8879.tar.gz
glibc-61e0617ac34c4daaeb2f07f89a05c9f9353b8879.tar.xz
glibc-61e0617ac34c4daaeb2f07f89a05c9f9353b8879.zip
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.
Diffstat (limited to 'elf/rtld.c')
-rw-r--r--elf/rtld.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index df6a945105..6aa3a65fbb 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.  */
     }