about summary refs log tree commit diff
path: root/elf/dl-load.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-11-06 17:25:46 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-11-21 16:15:42 -0300
commit55f41ef8de4a4d0c5762d78659e11202d3c765d4 (patch)
tree205676e94304e4a3a43e3a4eee4e027986593f09 /elf/dl-load.c
parent4a133885a7c8ae7ebe34e36fcdb353f8e94c810f (diff)
downloadglibc-55f41ef8de4a4d0c5762d78659e11202d3c765d4.tar.gz
glibc-55f41ef8de4a4d0c5762d78659e11202d3c765d4.tar.xz
glibc-55f41ef8de4a4d0c5762d78659e11202d3c765d4.zip
elf: Remove LD_PROFILE for static binaries
The _dl_non_dynamic_init does not parse LD_PROFILE, which does not
enable profile for dlopen objects.  Since dlopen is deprecated for
static objects, it is better to remove the support.

It also allows to trim down libc.a of profile support.

Checked on x86_64-linux-gnu.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'elf/dl-load.c')
-rw-r--r--elf/dl-load.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 8d351153c8..25ea4f7a4e 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1443,11 +1443,6 @@ cannot enable executable stack as shared object requires");
      name by which the DSO is actually known.  Add that as well.  */
   if (__glibc_unlikely (origname != NULL))
     add_name_to_object (l, origname);
-#else
-  /* Audit modules only exist when linking is dynamic so ORIGNAME
-     cannot be non-NULL.  */
-  assert (origname == NULL);
-#endif
 
   /* When we profile the SONAME might be needed for something else but
      loading.  Add it right away.  */
@@ -1455,6 +1450,11 @@ cannot enable executable stack as shared object requires");
       && 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));
+#else
+  /* Audit modules only exist when linking is dynamic so ORIGNAME
+     cannot be non-NULL.  */
+  assert (origname == NULL);
+#endif
 
   /* If we have newly loaded libc.so, update the namespace
      description.  */