public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/maskray/lld] elf: Replace .tls_common with .tbss definition [BZ #28152]
@ 2021-08-06 5:07 Fangrui Song
0 siblings, 0 replies; only message in thread
From: Fangrui Song @ 2021-08-06 5:07 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=dd1cdd281cc0ce8ac67b9238b0f22a56e9e92809
commit dd1cdd281cc0ce8ac67b9238b0f22a56e9e92809
Author: Fangrui Song <maskray@google.com>
Date: Sun Jul 25 17:29:19 2021 -0700
elf: Replace .tls_common with .tbss definition [BZ #28152]
.tls_common is obsoleted, not supported by clang -fintegrated-as or ld.lld.
Just change it to .tbss for portability.
Diff:
---
elf/tls-macros.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/elf/tls-macros.h b/elf/tls-macros.h
index e25e33b0f0..a637407417 100644
--- a/elf/tls-macros.h
+++ b/elf/tls-macros.h
@@ -1,7 +1,11 @@
/* Macros to support TLS testing in times of missing compiler support. */
#define COMMON_INT_DEF(x) \
- asm (".tls_common " #x ",4,4")
+ asm (".section .tbss\n\t" \
+ ".globl " #x "\n\t" \
+ ".balign 4\n\t" \
+ #x ":\t.space 4\n\t" \
+ ".previous")
/* XXX Until we get compiler support we don't need declarations. */
#define COMMON_INT_DECL(x)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-06 5:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06 5:07 [glibc/maskray/lld] elf: Replace .tls_common with .tbss definition [BZ #28152] 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).