public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Szabolcs Nagy <szabolcs.nagy@arm.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH] aarch64: Remove ld.so __tls_get_addr plt usage
Date: Fri, 5 Apr 2024 13:29:48 -0300	[thread overview]
Message-ID: <0af468ae-bf65-4e20-8bd7-af85eba2e5d9@linaro.org> (raw)
In-Reply-To: <ZhARiYQKa9BSdkoD@arm.com>



On 05/04/24 11:58, Szabolcs Nagy wrote:
> The 04/05/2024 09:35, Adhemerval Zanella wrote:
>> Use the hidden alias instead.
>>
>> Checked on aarch64-linux-gnu.
> 
> does this change behaviour in case __tls_get_addr is interposed?
> 
> 

Do we support symbol interposition for symbols in implementation namespace?
If so, we will need to revert x86 to use the same semantic and document it
properly.

>> ---
>>  sysdeps/aarch64/dl-tlsdesc.S                  | 3 ++-
>>  sysdeps/unix/sysv/linux/aarch64/localplt.data | 2 --
>>  2 files changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/sysdeps/aarch64/dl-tlsdesc.S b/sysdeps/aarch64/dl-tlsdesc.S
>> index 9b253b39dd..4febf2ad21 100644
>> --- a/sysdeps/aarch64/dl-tlsdesc.S
>> +++ b/sysdeps/aarch64/dl-tlsdesc.S
>> @@ -220,7 +220,7 @@ _dl_tlsdesc_dynamic:
>>  	SAVE_Q_REGISTERS
>>  
>>  	mov	x0, x1
>> -	bl	__tls_get_addr
>> +	bl	HIDDEN_JUMPTARGET(__tls_get_addr)
>>  
>>  	mrs	x1, tpidr_el0
>>  	sub	PTR_REG (0), PTR_REG (0), PTR_REG (1)
>> @@ -246,5 +246,6 @@ _dl_tlsdesc_dynamic:
>>  	b	1b
>>  	cfi_endproc
>>  	.size	_dl_tlsdesc_dynamic, .-_dl_tlsdesc_dynamic
>> +	.hidden HIDDEN_JUMPTARGET(__tls_get_addr)
>>  # undef NSAVEXREGPAIRS
>>  #endif
>> diff --git a/sysdeps/unix/sysv/linux/aarch64/localplt.data b/sysdeps/unix/sysv/linux/aarch64/localplt.data
>> index 5d217cc50d..5dd07472df 100644
>> --- a/sysdeps/unix/sysv/linux/aarch64/localplt.data
>> +++ b/sysdeps/unix/sysv/linux/aarch64/localplt.data
>> @@ -9,5 +9,3 @@ libm.so: matherr
>>  # If outline atomics are used, libgcc (built outside of glibc) may
>>  # call __getauxval using the PLT.
>>  libc.so: __getauxval ?
>> -# The dynamic loader needs __tls_get_addr for TLS.
>> -ld.so: __tls_get_addr
>> -- 
>> 2.34.1
>>

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

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-05 12:35 Adhemerval Zanella
2024-04-05 14:58 ` Szabolcs Nagy
2024-04-05 16:29   ` Adhemerval Zanella Netto [this message]
2024-04-06 17:40     ` Szabolcs Nagy
2024-04-08  8:04       ` Florian Weimer
2024-04-07 20:29   ` Cristian Rodríguez
2024-04-08  7:26     ` Szabolcs Nagy
2024-04-08 16:57       ` Adhemerval Zanella Netto
2024-04-09  8:30         ` Szabolcs Nagy
2024-04-09 14:03           ` Adhemerval Zanella Netto
2024-04-09 14:05             ` H.J. Lu
2024-04-09 14:11             ` Palmer Dabbelt
2024-04-09 14:46               ` H.J. Lu
2024-04-09 17:50             ` Fangrui Song
2024-04-10  7:29               ` Szabolcs Nagy
2024-04-10  8:23               ` Florian Weimer
2024-04-10 15:46                 ` enh
2024-04-15 11:41                   ` Florian Weimer
2024-04-15 20:22                 ` Adhemerval Zanella Netto

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=0af468ae-bf65-4e20-8bd7-af85eba2e5d9@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    --cc=szabolcs.nagy@arm.com \
    /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).