aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/alpha/dl-machine.h
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 /sysdeps/alpha/dl-machine.h
parent4a133885a7c8ae7ebe34e36fcdb353f8e94c810f (diff)
downloadglibc-55f41ef8de4a4d0c5762d78659e11202d3c765d4.tar
glibc-55f41ef8de4a4d0c5762d78659e11202d3c765d4.tar.gz
glibc-55f41ef8de4a4d0c5762d78659e11202d3c765d4.tar.bz2
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 'sysdeps/alpha/dl-machine.h')
-rw-r--r--sysdeps/alpha/dl-machine.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index ed5389e3c5..7fe2afca93 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -75,9 +75,7 @@ elf_machine_runtime_setup (struct link_map *map, struct r_scope_elem *scope[],
int lazy, int profile)
{
extern char _dl_runtime_resolve_new[] attribute_hidden;
- extern char _dl_runtime_profile_new[] attribute_hidden;
extern char _dl_runtime_resolve_old[] attribute_hidden;
- extern char _dl_runtime_profile_old[] attribute_hidden;
struct pltgot {
char *resolve;
@@ -109,6 +107,9 @@ elf_machine_runtime_setup (struct link_map *map, struct r_scope_elem *scope[],
else
resolve = _dl_runtime_resolve_old;
+#ifdef SHARED
+ extern char _dl_runtime_profile_new[] attribute_hidden;
+ extern char _dl_runtime_profile_old[] attribute_hidden;
if (__builtin_expect (profile, 0))
{
if (secureplt)
@@ -123,6 +124,7 @@ elf_machine_runtime_setup (struct link_map *map, struct r_scope_elem *scope[],
GL(dl_profile_map) = map;
}
}
+#endif
pg->resolve = resolve;
pg->link = map;