summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-02-27 15:19:12 +0000
committerUlrich Drepper <drepper@redhat.com>1999-02-27 15:19:12 +0000
commit4f46e038bca85919d290fb6e99b2e2a2d5191d04 (patch)
tree784ae2908521691c4d5cffc29a19198c70aaa565 /elf
parente4950117083ed6231741f77f162d47b3aa6b5933 (diff)
downloadglibc-4f46e038bca85919d290fb6e99b2e2a2d5191d04.tar.gz
glibc-4f46e038bca85919d290fb6e99b2e2a2d5191d04.tar.xz
glibc-4f46e038bca85919d290fb6e99b2e2a2d5191d04.zip
(lose): Add more comments to explain the `why'. (_dl_map_object): Remove redundant test.
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-load.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 345b97f099..b5e2ba9990 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -567,6 +567,12 @@ _dl_init_paths (const char *llp)
 }
 
 
+/* Think twice before changing anything in this function.  It is placed
+   here and prepared using the `alloca' magic to prevent it from being
+   inlined.  The function is only called in case of an error.  But then
+   performance does not count.  The function used to be "inlinable" and
+   the compiled did so all the time.  This increased the code size for
+   absolutely no good reason.  */
 #define LOSE(code, s) lose (code, fd, name, realname, l, s)
 static void volatile
 __attribute__ ((noreturn))
@@ -1242,7 +1248,7 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
       /* First try the DT_RPATH of the dependent object that caused NAME
 	 to be loaded.  Then that object's dependent, and on up.  */
       for (l = loader; fd == -1 && l; l = l->l_loader)
-	if (l && l->l_info[DT_RPATH])
+	if (l->l_info[DT_RPATH])
 	  {
 	    /* Make sure the cache information is available.  */
 	    if (l->l_rpath_dirs == NULL)