public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] arm: Remove ld.so __tls_get_addr plt usage
Date: Fri,  5 Apr 2024 12:29:27 +0000 (GMT)	[thread overview]
Message-ID: <20240405122927.AA34F3858424@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=95700e799809fff4307da05fa277820d21dec925

commit 95700e799809fff4307da05fa277820d21dec925
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Apr 4 17:03:32 2024 -0300

    arm: Remove ld.so __tls_get_addr plt usage
    
    Use the hidden alias instead.
    
    Checked on arm-linux-gnueabihf.

Diff:
---
 sysdeps/arm/dl-tlsdesc.S                  | 3 ++-
 sysdeps/unix/sysv/linux/arm/localplt.data | 2 --
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/sysdeps/arm/dl-tlsdesc.S b/sysdeps/arm/dl-tlsdesc.S
index ada106521d..e36a32859f 100644
--- a/sysdeps/arm/dl-tlsdesc.S
+++ b/sysdeps/arm/dl-tlsdesc.S
@@ -147,7 +147,7 @@ _dl_tlsdesc_dynamic:
 4:	.inst	0xeef12a10	/* vmrs	r2, fpscr */
 	str	r2, [r3]
 .Lno_vfp:
-	bl	__tls_get_addr
+	bl	HIDDEN_JUMPTARGET(__tls_get_addr)
 	rsb	r0, r4, r0
 #ifdef __SOFTFP__
 	tst     r5, #HWCAP_ARM_VFP
@@ -181,6 +181,7 @@ _dl_tlsdesc_dynamic:
 	eabi_fnend
 	cfi_endproc
 	.size	_dl_tlsdesc_dynamic, .-_dl_tlsdesc_dynamic
+	.hidden HIDDEN_JUMPTARGET(__tls_get_addr)
 
 3:      .long   _GLOBAL_OFFSET_TABLE_ - 0b - PC_OFS
 .Lrtld_global_ro:
diff --git a/sysdeps/unix/sysv/linux/arm/localplt.data b/sysdeps/unix/sysv/linux/arm/localplt.data
index 162c664a01..5d131a7921 100644
--- a/sysdeps/unix/sysv/linux/arm/localplt.data
+++ b/sysdeps/unix/sysv/linux/arm/localplt.data
@@ -4,5 +4,3 @@ libc.so: malloc
 libc.so: raise
 libc.so: realloc
 libm.so: matherr
-# The dynamic loader needs __tls_get_addr for TLS.
-ld.so: __tls_get_addr

                 reply	other threads:[~2024-04-05 12:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240405122927.AA34F3858424@sourceware.org \
    --to=azanella@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).