From patchwork Fri Apr 5 12:35:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1920252 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=gjF0gGMq; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V9ydr00KCz1yYh for ; Fri, 5 Apr 2024 23:36:15 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0DFBA384474B for ; Fri, 5 Apr 2024 12:36:14 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by sourceware.org (Postfix) with ESMTPS id 93DA438460A2 for ; Fri, 5 Apr 2024 12:35:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 93DA438460A2 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 93DA438460A2 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::231 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712320558; cv=none; b=TuA9AK9LUtpD3P5TQwwNlKRZUejHA/koPeWN5ic8pitu8DZK/n8HnGnZ3eWiqhe9ZKGJY4HeKnYavNrlSNyK4OuD/nbKQT5hKIGh2seJApZ2jdymKvd8gIqTtPh3fR9oCjaYTKJK4sCdCMga6jUbepn6hD1oGt+gaObFdDCM6i4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712320558; c=relaxed/simple; bh=AHWXnmPnnuLO+xwyqnBgXr4YckkhL2HXiGcJBgJES/0=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=AB/JA452z7ME8IWKE22/WTTxG9lj5bx86z3WDwHW+uP6XIRA/hhTEHXqKFJMsYHK6Cmer1ZKr4O56IiHmrcKkq858NZ3lkHojEZsQcd1KfGKE8jY0jBpYpFfob86SL5WfGVQ/v33r4MXgHJYM6TuXIPwYBA9z4ys1/s5cwt6NIg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oi1-x231.google.com with SMTP id 5614622812f47-3c5d940525fso1051845b6e.0 for ; Fri, 05 Apr 2024 05:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712320555; x=1712925355; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Ci4+S+ytE2tTlVmk8ExBMj8KkbeGRVpbmHaghSRmROA=; b=gjF0gGMq5qkzhMitYA9jfuOvrJEDOn8kcdO9uKGzL+L+EMZlTnRO4bk3r56QT+1lZr m+86ESC6gKiDQaN+s2fZIKEilsjzAg83JmPZKMK+7dIvpGgk3Dh4nAPcT7Rbi/RkrvcW 4BSJbB36iH1fe28II8uOiyXhr9u3Hm0Stem3x3MmMJeL6oREP0ulNGkxEKsLNFQgOL0j D/9A6cy7ncRQOpnHM3hHp/qVSAfg7LqqLinAe4ZBDfnf5ReQNnxnuvSSjMjkiDrMTItT qJDV4wLAyWOW7AZWOG1Itgu1XjngZA9rmdaLxxPyPK6K5Fna7atHHO07a+wMaEOEpOUp 7ZhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712320555; x=1712925355; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ci4+S+ytE2tTlVmk8ExBMj8KkbeGRVpbmHaghSRmROA=; b=Fbf5aiqQFgSdDAV63cXaN0HTVBybivypnfZblCBBIQui1+gNDvYOe1JpGcIroBm88d cRGzsv5iDFihxThRgAN5FR9yAyeOQXX5T8L/Z9EwDB7NlliHypGwTpKww/aePOxaZGRP V13WLiyuX5ahjbDzd9AjSdVaE9t1QyuHY0CeqrsoJQdcwdFNntlVcjuyQbeDdIS305wK 2/7OI6mvQqQRd24kgOrN62F6xQmB7+Xt5744yfxBDfZbjSi6TxLeNm0A8VdcBW2FEvOl qAuxPyltwlE/6hBZHBdkdvXulSXlihw2k7TLz/B6zTu1hA9sshzEaLEAawXLCdGYxJk9 16Gg== X-Gm-Message-State: AOJu0Yx5k2pbwSdJGJbS1ZzEDiCtk8x4Ke9MonEVYXxfddVGoBrZPqmx cvXlMSpvWUb0LEaHLJdobdWC+qwgZ2Bd7FcML2wtvtmXAlqV79tA6ikMqP9mmMyBNoVSEPVPdA5 D X-Google-Smtp-Source: AGHT+IElYXc5ofm+4l6+Flr+hshPilDGH/RWkiixiTJgk3jLCVocG20lpVss/DLydmpxOkGIGXGfEA== X-Received: by 2002:a05:6358:7b90:b0:181:65b4:f99c with SMTP id n16-20020a0563587b9000b0018165b4f99cmr1290319rwg.19.1712320554787; Fri, 05 Apr 2024 05:35:54 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c0:3e7e:ae50:7e46:e99f:92f7]) by smtp.gmail.com with ESMTPSA id r6-20020a63ec46000000b005f077dce0f6sm1318571pgj.31.2024.04.05.05.35.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 05:35:54 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Szabolcs Nagy Subject: [PATCH] aarch64: Remove ld.so __tls_get_addr plt usage Date: Fri, 5 Apr 2024 09:35:50 -0300 Message-Id: <20240405123550.1748641-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-12.8 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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Use the hidden alias instead. Checked on aarch64-linux-gnu. --- 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