diff mbox series

arm: Remove ld.so __tls_get_addr plt usage

Message ID 20240405123610.1748784-1-adhemerval.zanella@linaro.org
State New
Headers show
Series arm: Remove ld.so __tls_get_addr plt usage | expand

Commit Message

Adhemerval Zanella Netto April 5, 2024, 12:36 p.m. UTC
Use the hidden alias instead.

Checked on arm-linux-gnueabihf.
---
 sysdeps/arm/dl-tlsdesc.S                  | 3 ++-
 sysdeps/unix/sysv/linux/arm/localplt.data | 2 --
 2 files changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

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