]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(_dl_map_object_from_fd): Always add SONAME to l_libname if profiling is
authorUlrich Drepper <drepper@redhat.com>
Thu, 28 Feb 2002 06:41:11 +0000 (06:41 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 28 Feb 2002 06:41:11 +0000 (06:41 +0000)
enabled.

elf/dl-load.c

index fc098a7497213b9b9853ab775c1afb167d906357..1183acb1d766e37f8964c44dfc1dc41a53a41f21 100644 (file)
@@ -1184,6 +1184,13 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
   l->l_dev = st.st_dev;
   l->l_ino = st.st_ino;
 
+  /* When we profile the SONAME might be needed for something else but
+     loading.  Add it right away.  */
+  if (__builtin_expect (GL(dl_profile) != NULL, 0)
+      && l->l_info[DT_SONAME] != NULL)
+    add_name_to_object (l, ((const char *) D_PTR (l, l_info[DT_STRTAB])
+                           + l->l_info[DT_SONAME]->d_un.d_val));
+
   return l;
 }
 \f