From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by sourceware.org (Postfix) with ESMTPS id 2B1EA3858C98 for ; Fri, 5 Apr 2024 16:29:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2B1EA3858C98 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2B1EA3858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1036 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712334593; cv=none; b=DTNKWumbB19dVd/uXWz7EQWvtdnc4Y/A0gFlqbGlf7/JtSmhk4/nUpODIYYfcUEICv4FvwqxhwsZZ1TQiLuUgMvJ/aE6JQmMtuCgLY2Q3nx6MtZEwZgzMMUQu1GzU5oKPqJz/NOVLCbj1Ou602J7zl6bfoXxR853//SK08kJenY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712334593; c=relaxed/simple; bh=0azOLkQcou0CWCe+IM1n0mh7ln6Vdn7FJ8/HJjR6rKQ=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=Uus8pOI6C03n7KvXD145PJnPHybwSyI9zkMJDLInfNV2ZT9csYvl3MXNHF8IqRo6b5JE792jnJmjVrBuzfmItznRvEdx6qWvV44ABNW2ng962dsUm/W/pHMrJlXHUS4sCtFTA0OuSjyO44QxcWMRpfQHFC1v0o3M6ZH7L+4d6eM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-2a2ec65332fso1320079a91.1 for ; Fri, 05 Apr 2024 09:29:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712334591; x=1712939391; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=ZHa0uyAmBFivPC7JMr8XXJIFDxH02OjsIDR7wO5JXXg=; b=d0SNgLwmBbUe/J8LLLemCd40rvBAL0qGw+IgxuxLO/4kg3mowO53Odmqlou9bq7dS4 2YlS9exX2yPkfAK9NkSiP9L5AEge0XK+Qla373lJ/QdXdmjZUkktbP/ctAVcvcScAdHJ fMnJvo7DCkWCkpkZrX62QfT65snPG3YL8X12qYyzPKTA6O/Z7wINmQC//BSsa4M8UW+3 N7I9U/DuxJPZlxZNbobP5pcd05K/ooyLF/k1ubqVr0jb6Yx/yrMr7at2XcRBGzmrim1z UEljJJVULNRgS7eJoJqJtRiMlENBkQXizozVSLh+e7gbUeZn31FvDGW2Ycxs6xYLeKEl imPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712334591; x=1712939391; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZHa0uyAmBFivPC7JMr8XXJIFDxH02OjsIDR7wO5JXXg=; b=AXIEAYXeZlnJpGoRiFLDkIz7dcfbsMYgjCv4sEmI0SwWaeDNX8PD3Fq6Hc4ujUurzt FXW5FqYDVKuf1e091adVtzgabIhqbgYajS00vVkNS+egR+39t3k+7BA6dnJUP2nrP9su zLNBi5gGLi1Gy0jmnWpdBDtVDyFPEyRK6StTWa8kB/M3tP1CKohF4IG36F+kUG9dt4wk 2qq6uae8OcGBsm9K5qmxSnP6uEti7+avwW8FgGdicmIXDLJU/j9QAC42P1Ur4/C+vp0r +oSYNmxHEBVy4rIQpqjt1GMQvuDgUFeFs5elt5wThABAgnDuDLNL7fulw73S+P7ieK5a 9fxg== X-Forwarded-Encrypted: i=1; AJvYcCWPEMfvHdGD5GLH3kta8opl5bZHeeSEgpF5s3NU70HJIEoY7H+nAwF+/sec+JLZu1RsBW33SwH7KiKreAy1QVROto2ue4nkiTIm X-Gm-Message-State: AOJu0YxXVoXEqjc0+wA46yOtUcYaleosw3CU4FhcxVEgdP+Re1CECTe6 W7zwvIzDB0MeHQOmOJB0bbE64Y8QgGknE9M7Q/2LzbMCWkwgEygj6jZqO5+DC3L0Oi4X7+LnXJt p X-Google-Smtp-Source: AGHT+IGPcGAs3GVuxptV+tW+H/txOYQ63GuVJ3WThZbLMzVjxE8/0LKKBzujOpyAtSotr2R/GdoJWw== X-Received: by 2002:a17:90b:607:b0:2a2:55de:93eb with SMTP id gb7-20020a17090b060700b002a255de93ebmr1828714pjb.33.1712334591069; Fri, 05 Apr 2024 09:29:51 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c0:3e7e:1da:fede:338:8975? ([2804:1b3:a7c0:3e7e:1da:fede:338:8975]) by smtp.gmail.com with ESMTPSA id l15-20020a17090a070f00b002a0777a2b1asm1851963pjl.10.2024.04.05.09.29.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Apr 2024 09:29:50 -0700 (PDT) Message-ID: <0af468ae-bf65-4e20-8bd7-af85eba2e5d9@linaro.org> Date: Fri, 5 Apr 2024 13:29:48 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] aarch64: Remove ld.so __tls_get_addr plt usage To: Szabolcs Nagy , libc-alpha@sourceware.org References: <20240405123550.1748641-1-adhemerval.zanella@linaro.org> Content-Language: en-US From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 >>