From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 67AA1C77B7F for ; Sat, 13 May 2023 09:00:31 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2DC5D863A3; Sat, 13 May 2023 10:59:41 +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="h6hgcVXM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2AA9384676; Sat, 13 May 2023 01:02:01 +0200 (CEST) Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) (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 76FC686229 for ; Sat, 13 May 2023 01:01:58 +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-x432.google.com with SMTP id d2e1a72fcca58-6439bbc93b6so7389841b3a.1 for ; Fri, 12 May 2023 16:01:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683932516; x=1686524516; 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=Hp1E9AT8wXlbJOlmaSzUh7zUEdtrGrdB0KRjPzmb2YI=; b=h6hgcVXMx54xH9qc097cLcGY6y2/bhHYgc0nY6DprPqbCXhTG/haBngt2j3Y7wx3mM Fms47ktn+54OaErmpjLsHCvjX118Z/yGlbxwV1ohUFW/5wVfL7kzmpfKDWYhx6W21nZp 6BYyBqVJDqbGTubUc54ymsposTlG4Z6YoG7x1Gq0ESzgRa2/2hA4kdaqBJXJjibuZVL3 3IUpUfeYMSzSL/e+Wuy6Xwxy5E7XuZfOsA0N+kjZ8mQG72m89hSe76rV6TcVadpNytUI QXbJ5G5GDwyP5P544ckcQDGZat0JIZzhCDOXT1YTK4PIY3KqHG/wKDz5lUSyEn4b1KOz Gqfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683932516; x=1686524516; 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=Hp1E9AT8wXlbJOlmaSzUh7zUEdtrGrdB0KRjPzmb2YI=; b=iNpaUWsKqPo4pr8nqRbqv/ox6kZZdibaWUud45gB2BnNONH4400nxeeNa79IN6sJ/V AZrULMbTJCgqfdI3fiqBFZu+uj7GhthAYRX3KjDhF5bvkriuDJbkhSHUSyJ286f6Io/f jpRr0tnOxRamgBaCZ4WKgYwcdxXi8OR8g57TRs7hjwH51Pq7QIL2RQCT+2I8NLPI/gnL Ar7+hgFseQySmlJ8QxEy8AchW9oKAs8yhannhNFvyjQpnkEI4OAysPVHrMNRodGZ0hsv EiQGj6j3Tr03sFshGXfWI0pJ3mVoFGiD+kYuORazUq7+TaUcWhsFob6kSuqiDogQEnOX Hy3g== X-Gm-Message-State: AC+VfDzBXVzdMEhiLwmzGJ3Iv4O+LWa7y/9NdZVoFdMuPpIqrbXWAFPu cH2bV44sMT4Mqw+18r+ncPf/CS5iylX+GQ== X-Google-Smtp-Source: ACHHUZ5D2LSSJP9glOeNm2fFAVY7PsQUyYq5CS1Fb7Aa3ePIpaN3wVkDodttbyyQErXj00WLfMWFGw== X-Received: by 2002:a17:902:d486:b0:1ad:d2b1:3faf with SMTP id c6-20020a170902d48600b001add2b13fafmr7133836plg.21.1683932516486; Fri, 12 May 2023 16:01:56 -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 n10-20020a170902d2ca00b001ab2592ed33sm8509704plc.171.2023.05.12.16.01.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 May 2023 16:01:56 -0700 (PDT) From: Sam Edwards X-Google-Original-From: Sam Edwards To: u-boot@lists.denx.de Cc: Tom Rini , Sam Edwards Subject: [PATCH 3/3] clang: Link with --no-pie instead of --apply-dynamic-relocs Date: Fri, 12 May 2023 17:01:35 -0600 Message-Id: <20230512230135.133162-3-CFSworks@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230512230135.133162-1-CFSworks@gmail.com> References: <20230512230135.133162-1-CFSworks@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Sat, 13 May 2023 10:59:35 +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 The goal of using --apply-dynamic-relocs seems to be to have all relocations applied "statically" to the output binary, so that the dynamic segment can be dropped safely. However, LLD still creates sections to support the dynamic section, and platform linker scripts may not know to discard these. Since the build process does not appear to make use of the dynamic segment at all, it would be more sensible to suppress it entirely. Signed-off-by: Sam Edwards --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 20785860f7..d71127e412 100644 --- a/Makefile +++ b/Makefile @@ -1024,7 +1024,7 @@ LDFLAGS_u-boot += $(LDFLAGS_FINAL) LDFLAGS_u-boot += $(call ld-option, --no-dynamic-linker) # ld.lld support -LDFLAGS_u-boot += -z notext $(call ld-option,--apply-dynamic-relocs) +LDFLAGS_u-boot += -z notext $(call ld-option,--no-pie) LDFLAGS_u-boot += --build-id=none -- 2.39.2