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 X-Patchwork-Id: 786245 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:1101:b0:343:f27d:c44e with SMTP id z1csp145804wrw; Fri, 5 Apr 2024 05:36:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU8XfYE0p3037mIveq6VKeor0iJNJq9z152zPCicR6GoR0ALoneV/8PdLEbt55sef+NgzlfZCqgimif8p4AiqvZ X-Google-Smtp-Source: AGHT+IER2VCRNWBRjQj8T4k9py9psK7KTOTjThuAeimHfGPtRGKS0F775qUgxw1Gzfa/BRzoY4GI X-Received: by 2002:ac8:7fc4:0:b0:431:4947:a644 with SMTP id b4-20020ac87fc4000000b004314947a644mr1109550qtk.22.1712320568792; Fri, 05 Apr 2024 05:36:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712320568; cv=pass; d=google.com; s=arc-20160816; b=bZgyDJsoI2CCSZ4RbU4Hgd+seg8d5o1rBTyuUvvUdiO9P5stdzuSn0aX6zIEyWeDZT 0BuXrPxHgNggY5RXJQdH9iJwCcVRFTM0QNmuuJy/oiTGHvwDKxm/nuVg+QWfpxp8Vfi6 Ph0cMINc6A7vTyS6aRIbNr7f4AIYam/tgfyucbn3PTWqKam5+voqjHwCxON+dYFuvOD6 ERBEbc9Wf/nn2k8buZl2dz7h1qTnmH9oZK8UJhPBxR/HGTUVAKbP60WBTRiSL5MlXGsp 4rMmyKaNjUNvRa7AX6ubIXrEQESTMGECZMLCCR8yf56QUc+Ux+1/6WD0mA7lP5+AjKb1 t0ng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=Ci4+S+ytE2tTlVmk8ExBMj8KkbeGRVpbmHaghSRmROA=; fh=RpnbCZOi9pb0FkWx9hosYzQESzaBuU3/nWTCqb1SfyU=; b=N8ZHA9PB1wS7vIMnHXu6mvqUG9nwFkeM2isOccpR6kD2ZnWqzpTzNWUTTg97PyiWiH Dzf82TygiE32sj4ovHYXBqFvDg3ZYBcLV4Sn9+qMS6kkTFr/Sp5jRtofH3Hx9Zjv6OmV ahgs2QkBo34PCzal9hCPwIDVm743orCp8yDBp+wC0e4ElvEu4oHEdDKry4DU4XNMz449 MIDst+eFvxfpg01Tzyefgh+P6Ss7wB7BV1HXYLObF0v1ZebcrtejY5KZuNArHIFdiCG3 p5dXMVFJM1UOCBI3jHbYbQUUeCY0q+UHbsrhrDCGuXmshRQ6GByVBDR9VLWd/BVb9JOO lhBw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gjF0gGMq; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id g6-20020ac85d46000000b00431823e43d4si1701180qtx.461.2024.04.05.05.36.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 05:36:08 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gjF0gGMq; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 678F23846024 for ; Fri, 5 Apr 2024 12:36:08 +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-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+patch=linaro.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