public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] elf: Always provide _dl_get_dl_main_map in libc.a
@ 2024-01-01 13:24 H.J. Lu
0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2024-01-01 13:24 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8d9f9c44605d1b4e3152bdd3f8f0daebd790380f
commit 8d9f9c44605d1b4e3152bdd3f8f0daebd790380f
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Dec 29 08:43:50 2023 -0800
elf: Always provide _dl_get_dl_main_map in libc.a
Always provide _dl_get_dl_main_map in libc.a. It will be used by x86
to process PT_GNU_PROPERTY segment.
Diff:
---
elf/dl-support.c | 2 --
sysdeps/generic/ldsodefs.h | 7 +++----
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/elf/dl-support.c b/elf/dl-support.c
index 837fa1c836..70c5b3599a 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -344,7 +344,6 @@ _dl_non_dynamic_init (void)
DL_SYSINFO_IMPLEMENTATION
#endif
-#if ENABLE_STATIC_PIE
/* Since relocation to hidden _dl_main_map causes relocation overflow on
aarch64, a function is used to get the address of _dl_main_map. */
@@ -353,7 +352,6 @@ _dl_get_dl_main_map (void)
{
return &_dl_main_map;
}
-#endif
/* This is used by _dl_runtime_profile, not used on static code. */
void
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 9b50ddd09f..bbf51bc1f5 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -1172,10 +1172,6 @@ void __libc_setup_tls (void);
# if ENABLE_STATIC_PIE
/* Relocate static executable with PIE. */
extern void _dl_relocate_static_pie (void) attribute_hidden;
-
-/* Get a pointer to _dl_main_map. */
-extern struct link_map * _dl_get_dl_main_map (void)
- __attribute__ ((visibility ("hidden")));
# else
# define _dl_relocate_static_pie()
# endif
@@ -1217,6 +1213,9 @@ rtld_hidden_proto (_dl_deallocate_tls)
extern void _dl_nothread_init_static_tls (struct link_map *) attribute_hidden;
+/* Get a pointer to _dl_main_map. */
+extern struct link_map * _dl_get_dl_main_map (void) attribute_hidden;
+
/* Find origin of the executable. */
extern const char *_dl_get_origin (void) attribute_hidden;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-01 13:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-01 13:24 [glibc] elf: Always provide _dl_get_dl_main_map in libc.a H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).