From patchwork Sat May 20 20:55:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Edwards X-Patchwork-Id: 1784181 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=fEPoHlbc; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QPKlx2H7Cz20PS for ; Sun, 21 May 2023 22:34:53 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3C4AD846CC; Sun, 21 May 2023 14:33:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="fEPoHlbc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BC48D847A7; Sat, 20 May 2023 22:56:09 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EF3E1846F5 for ; Sat, 20 May 2023 22:56:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=cfsworks@gmail.com Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-64d4e45971bso344026b3a.2 for ; Sat, 20 May 2023 13:56:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684616164; x=1687208164; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZP7oZBOt2Y9JmvV73KeVyNK6urOc+A4hAt44mjvMR3E=; b=fEPoHlbcil6hLB81UWeN0B8/guB+zuuYRyvhWSv7rpTr/R2E8tTrCjoyS4aX5r5qeN ga5XtgF7PlS6Qlil+FQQ4ZN7O8R4EUB8/39cJ8bhyIoJ8cTslo6Xr2qsbs80nuerrYtf Uf8KIbQA518SClbS3xt+3kiADYprSY0oGndOBq1KLZ14Lk9gSDMV2/xwhGVgFxv12eiq bDohGKd4rn1T7AjjAbjbwqzYafxxwmsTnuQxCy+aKsEePM2p/1UfH9jDs6+O1kEy5Lej lcPeqAAiwLerGiKONeAOK63skoWCHNzip8QDrH90ZvpvuBPpetwK/vbJeO4Wk5kngw9D Q1Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684616164; x=1687208164; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZP7oZBOt2Y9JmvV73KeVyNK6urOc+A4hAt44mjvMR3E=; b=QXR3ccTqT50tLjKDo/P/Hq7M1e1iRWNA+CZtJ9dBGfzch93DsmPjwDfeCz9qQps5E9 SzpVJjo8bHo2uLkyjZWTEZWKmGpegIa1GOimsQE2EGp5K6FdN0Ns1xsP0rW28AFG3qBD 9jc317dtzllxdPjAC9keBKBJF87nWVtbbQq2YPLzNVjaeL90xZK15KJyH4m5rp5U1tV5 C8F44fmOpMjn14cjr5JjhZ5JodtAGelO3g5qc1UgawCdBWSKQxpA3LKuroEJ9wQF1oas TaCgs6L1UnHWX1A2G56an2F4PLt91MacD8a6pEu0VwfyBWEu4u1ZBmB2b9ar53NcvyAA NY+Q== X-Gm-Message-State: AC+VfDzgpCSTrT2mZ3vyCKqEoaVdXYV2xqwqy6996LyG/EUOPNJo68fT /LWQeqoIgszEC2ryV48OfjzDXlBZj45nMgJ9 X-Google-Smtp-Source: ACHHUZ5XieHxdwbInaXsVDPq99xNqfdFrsgst+R2IPXXPjKpS4G38q5tEQWE4novSnoMWKIpgyweMw== X-Received: by 2002:a05:6a00:14c4:b0:644:d220:64ac with SMTP id w4-20020a056a0014c400b00644d22064acmr8906717pfu.2.1684616164059; Sat, 20 May 2023 13:56:04 -0700 (PDT) Received: from celestia.nettie.lan (static-198-54-134-172.cust.tzulo.com. [198.54.134.172]) by smtp.gmail.com with ESMTPSA id j17-20020a62e911000000b0064d413caea6sm1651045pfh.179.2023.05.20.13.56.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 May 2023 13:56:03 -0700 (PDT) From: Sam Edwards X-Google-Original-From: Sam Edwards To: u-boot@lists.denx.de Cc: Sam Edwards , Andrew Scull , Simon Glass , Tom Rini Subject: [RFC PATCH 06/10] arm: discard .gnu.version* sections Date: Sat, 20 May 2023 14:55:43 -0600 Message-Id: <20230520205547.1009254-7-CFSworks@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230520205547.1009254-1-CFSworks@gmail.com> References: <20230520205547.1009254-1-CFSworks@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 21 May 2023 14:33:27 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean These are often a consequence of --pie, but they aren't actually used in the runtime relocation code. It is better to discard them than to aggregate them, because they tend to be of different types, and this upsets some linkers (e.g. LLD). Signed-off-by: Sam Edwards --- arch/arm/cpu/u-boot.lds | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds index fc4f63d834..8cdf08a730 100644 --- a/arch/arm/cpu/u-boot.lds +++ b/arch/arm/cpu/u-boot.lds @@ -229,6 +229,12 @@ SECTIONS KEEP(*(.__bss_end)); } + /* + * LLD's --pie may synthesize these sections, even if they are empty; + * discard them, for we do not need version symbols + */ + /DISCARD/ : { *(.gnu.version*) } + .dynsym _image_binary_end : { *(.dynsym) } .dynbss : { *(.dynbss) } .dynstr : { *(.dynstr*) }