From patchwork Fri Apr 5 12:36:10 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: 1920253 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=uXHy3bnl; 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 4V9yfF0sT5z1yYh for ; Fri, 5 Apr 2024 23:36:37 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5CEF83846059 for ; Fri, 5 Apr 2024 12:36:35 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id 80E3D3846079 for ; Fri, 5 Apr 2024 12:36:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 80E3D3846079 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 80E3D3846079 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::433 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712320578; cv=none; b=uAdZeLwcCOJU8ZrX3WxlzKs1lfBvSFlccjNDTLpGZWb37RNuE3E2rvwSqeGJJnDrf3Ac8nxhc10B99C//1yV6cToi2TzgziPzWttzoezTOMED5Fq7BuPEcv2E1W3a4PxAweav1v72475o6q/6BqjkWSOxWnerTDmbVo4hReafH0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712320578; c=relaxed/simple; bh=xx2ZYQ3RZsWsZaLCFdLe+5oNt7AEZF74Gc2gRZcc6fk=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=Rdoa0AQ+imF41kNUkWodwMuZt69TLRQQQjeK5ByW1luc7kZwrPHgjUJkvDenx1h9NU35w7/x+LEZLkywoyOGyFFkTreWBixr5VqgSSxDLRDz8q2aKBU99ZCSGIYgtoCVb94JDxE2vINeYiZ/wq1Zb46vXAlZS426BVTelWicF+g= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-6eaf7c97738so1701304b3a.2 for ; Fri, 05 Apr 2024 05:36:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712320574; x=1712925374; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=F1GrojKSOV2lMzF2r6Gv5x5hYiw2wnoYlH0I6iKsKCw=; b=uXHy3bnlyCvUvzzroZbN+mUoi6h1+Ig2dPGxgFWbdQY+eT4nr4LIXCpwrCOMHor4ky D4ybJhr6mJWSiVFG+4sCxBeAhaHhGji+J5HpXqFGbIVr+9I2qW6IxTOoA1MFAgTEtVtY qazN2DIi8uhRJVG9CB10LzX+gnvDp6Oh5eUxtMUEbSEzRFnFxSSsns9xBljYdDAuZ51r 2PWiF+S6AvYDQpUOeT7XVYM2QMIMcTD6vPdztY8AVwB8hk/xDm+YSkzXdyllMvybHy/5 EIvfO5H9dubRQ5DFMEpwIaOhFGPgXffLQAsFb9Xfs0TEA+DRRw88h8e16sooX8xgVDZS fk8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712320574; x=1712925374; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=F1GrojKSOV2lMzF2r6Gv5x5hYiw2wnoYlH0I6iKsKCw=; b=uksALFdOle9yrlKsCBZ0QknqeKKOX1W9dsone312Ff6MUwqqs1uPq7lHynf6Ek9Ltc zewD6FauNqfDt3Ms29bPDw3z6yruf0tdn1TjrV5yrz5NrU+I346a9R2vbzCkBLJURQg1 7o0wBW/P1yKW3eHNNI0lju1zWFDSP6swHLqZI6x8kVIPJnQkrA6a9eZSMHl7iMno44Jg wyKM7HzArnQ074vo8F0DMnYEYLrJX5SNdm9AlH8XvVncLq3Hx5pkEssWU4UD3ROXoMeb QVNjErtQ7iyqUZzD1H7PWTw9JKUQ7e/Qsanp88eFBNgzbHiyJfz1rQtcbCaMfLv3VDoC fQUg== X-Gm-Message-State: AOJu0Yy6cqzq/FH8gqOnZLZUWEg8kUJaQphBmMjUbwkk6X9838LQlsaG ENnqYECGPlW4Tz9XJu6g5rvHgla/Mmj2I4T8M/+u/bTxh99jRfgo7lJMJIPqq6mRYWBUwx9psl7 V X-Google-Smtp-Source: AGHT+IHbiX9jf/SODyUDCDxlL8Tn439ad+9Ha1UhXp/Loy8XW+hbtrhRV7Y9nxHdkv4P8Mjyu3uw+Q== X-Received: by 2002:a05:6a00:8b93:b0:6ed:2f2:a8e with SMTP id ig19-20020a056a008b9300b006ed02f20a8emr795488pfb.30.1712320574284; Fri, 05 Apr 2024 05:36:14 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c0:3e7e:ae50:7e46:e99f:92f7]) by smtp.gmail.com with ESMTPSA id r14-20020aa79ece000000b006ecf72cf8easm1373979pfq.22.2024.04.05.05.36.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 05:36:13 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH] arm: Remove ld.so __tls_get_addr plt usage Date: Fri, 5 Apr 2024 09:36:10 -0300 Message-Id: <20240405123610.1748784-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 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 --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