public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/google/grte/v5-2.27/master] Revert "Add a workaround for lld placing the _GLOBAL_OFFSET_TABLE_ at an unexpected location"
@ 2021-08-27 20:29 Fangrui Song
0 siblings, 0 replies; only message in thread
From: Fangrui Song @ 2021-08-27 20:29 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=81f61b22f0312af3d411fea7ea2d9b882952264c
commit 81f61b22f0312af3d411fea7ea2d9b882952264c
Author: Fangrui Song <i@maskray.me>
Date: Thu Aug 26 17:35:02 2021 -0700
Revert "Add a workaround for lld placing the _GLOBAL_OFFSET_TABLE_ at an unexpected location"
This reverts commit 575707c22f901b0adcce2478cc32da62afff287e.
The issue has been fixed by LLD patch https://reviews.llvm.org/D59594
and fixed by glibc upstream as well.
Diff:
---
elf/rtld.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/elf/rtld.c b/elf/rtld.c
index 9d951f2466..498d9f5861 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -519,16 +519,6 @@ _dl_start (void *arg)
/* Read our own dynamic section and fill in the info array. */
bootstrap_map.l_ld = (void *) bootstrap_map.l_addr + elf_machine_dynamic ();
- /* As a workaround for lld placing _GLOBAL_OFFSET_TABLE at an
- unexpected location, detect when the bootstrap map base and
- dynamic section have the same address, and patch the base value
- back to something plausible. This is probably x86_64-specific,
- and should go away once lld does the right thing. */
-#ifdef HAVE_EHDR_START
- extern const ElfW(Ehdr) __ehdr_start __attribute__ ((visibility ("hidden")));
- if (bootstrap_map.l_ld == ((void *) bootstrap_map.l_addr))
- bootstrap_map.l_addr -= (((char *) bootstrap_map.l_addr) - ((char *) &__ehdr_start));
-#endif
elf_get_dynamic_info (&bootstrap_map, NULL);
#if NO_TLS_OFFSET != 0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-27 20:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 20:29 [glibc/google/grte/v5-2.27/master] Revert "Add a workaround for lld placing the _GLOBAL_OFFSET_TABLE_ at an unexpected location" Fangrui Song
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).