Upstream commit: fffc2df8a3e2c8cda2991063d23086360268b777 - i386: Provide GLIBC_ABI_GNU_TLS symbol version [BZ #33221] - i386: Update ___tls_get_addr to preserve vector registers - Extend struct r_debug to support multiple namespaces (RHEL-101985) - Fix a potential crash in the dynamic loader when processing specific symbol versions (RHEL-109683) - Signal la_objopen for ld.so with dlmopen (RHEL-109693) - Switch to main malloc after final ld.so self-relocation (RHEL-109703) - Prevent ld.so from asserting and crashing during audited library loads (RHEL-109702) - x86-64: Provide GLIBC_ABI_DT_X86_64_PLT symbol version (RHEL-109621) - x86-64, i386: Provide GLIBC_ABI_GNU2_TLS symbol version (RHEL-109625) - Ensure fallback initialization of ctype TLS data pointers to fix segfaults in programs using dlmopen or auditors (RHEL-72018) - Handle load segment gaps in _dl_find_object (RHEL-104854) - AArch64: Improve codegen in SVE log1p - AArch64: Optimize inverse trig functions - AArch64: Avoid memset ifunc in cpu-features.c [BZ #33112] Resolves: RHEL-109536 Resolves: RHEL-72018 Resolves: RHEL-101985 Resolves: RHEL-104854 Resolves: RHEL-109621 Resolves: RHEL-109625 Resolves: RHEL-109683 Resolves: RHEL-109693 Resolves: RHEL-109702 Resolves: RHEL-109703
54 lines
1.8 KiB
Diff
54 lines
1.8 KiB
Diff
commit 5434cc2c4152dddcfb2a6f6cb39b6ff33099a193
|
|
Author: Florian Weimer <fweimer@redhat.com>
|
|
Date: Wed Nov 6 10:33:44 2024 +0100
|
|
|
|
elf: Do not define consider_profiling, consider_symbind as macros
|
|
|
|
This avoids surprises when refactoring the code if these identifiers
|
|
are re-used later in the file.
|
|
|
|
Reviewed-by: DJ Delorie <dj@redhat.com>
|
|
(cherry picked from commit a79642204537dec8a1e1c58d1e0a074b3c624f46)
|
|
|
|
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
|
|
index 4bf7aec88b844bc7..b2c1627ceb847486 100644
|
|
--- a/elf/dl-reloc.c
|
|
+++ b/elf/dl-reloc.c
|
|
@@ -220,8 +220,8 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
|
|
int lazy = reloc_mode & RTLD_LAZY;
|
|
int skip_ifunc = reloc_mode & __RTLD_NOIFUNC;
|
|
|
|
-#ifdef SHARED
|
|
bool consider_symbind = false;
|
|
+#ifdef SHARED
|
|
/* If we are auditing, install the same handlers we need for profiling. */
|
|
if ((reloc_mode & __RTLD_AUDIT) == 0)
|
|
{
|
|
@@ -240,9 +240,7 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
|
|
}
|
|
#elif defined PROF
|
|
/* Never use dynamic linker profiling for gprof profiling code. */
|
|
-# define consider_profiling 0
|
|
-#else
|
|
-# define consider_symbind 0
|
|
+ consider_profiling = 0;
|
|
#endif
|
|
|
|
/* If DT_BIND_NOW is set relocate all references in this object. We
|
|
@@ -300,7 +298,6 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
|
|
|
|
ELF_DYNAMIC_RELOCATE (l, scope, lazy, consider_profiling, skip_ifunc);
|
|
|
|
-#ifndef PROF
|
|
if ((consider_profiling || consider_symbind)
|
|
&& l->l_info[DT_PLTRELSZ] != NULL)
|
|
{
|
|
@@ -321,7 +318,6 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
|
|
_dl_fatal_printf (errstring, RTLD_PROGNAME, l->l_name);
|
|
}
|
|
}
|
|
-#endif
|
|
}
|
|
|
|
/* Mark the object so we know this work has been done. */
|