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 29A45C77B7D for ; Sun, 14 May 2023 15:29:04 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A0608846F6; Sun, 14 May 2023 17:28:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="TqvS22d/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B906B8479D; Sun, 14 May 2023 17:28:50 +0200 (CEST) Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) (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 BE2E6846F6 for ; Sun, 14 May 2023 17:28:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-yb1-xb33.google.com with SMTP id 3f1490d57ef6-ba76528fe31so5224391276.1 for ; Sun, 14 May 2023 08:28:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1684078127; x=1686670127; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=nTb5thFqrVy4P3ITqMsRjLjTqw4LaMKpTlRQiaEwFHU=; b=TqvS22d/ATm0xLfE7GgmojhC1Ice/dHBs6XEYgh8kWkNVpTly3BiP4ddRTiyVgv8vP ySiBPBtthk02CZhpbCivU9AmB+MoqJDK8jeS0iXp0Jgfi2T8MLVrnuFEzQfFlVSKAQFB Baxkx9dU8sJKE3W6x32YV+76s/RD3dCUUHY+Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684078127; x=1686670127; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=nTb5thFqrVy4P3ITqMsRjLjTqw4LaMKpTlRQiaEwFHU=; b=TOnocwaQOiS0xONvjm8PifknK7m+SgFYT/a0T8poinRoXdjeTeXwOqSFeKfG3Bx6g7 VT5Gn27YcsOBZhRsZZm+x92I//ufcPfwrKBjbqWk348Q+J9qOEhq8oqfFBxIquS/M2bT 4NK7x2KMoCuMqtMSM/dJnwPc2FjGARXL9ZoaxpvKu0NrBlE083k6FnYPbQCZ8QSmVGuN ROSuyAqvy7JExGehzYHAGZehtlWewljbOHfqnGiRoxg9qeKUSOOQqntWW6S65IJp0UtP MnoaninB5AY9apiEXvx1JWYteVS5pdaONOLglX02EwSoIg/MYXtvjjpJK59iENxzCA70 3hCg== X-Gm-Message-State: AC+VfDxHjmr6O11OJpGyklVClGLvRes/b9COS2qb2zNh6d5GXmNgG53+ 3SMSdV8KA1Jcjk7wrnJ5NQC+LcrV4aRFLPy1WNUqJg== X-Google-Smtp-Source: ACHHUZ6WC1JtXCWU1WKrgLFWrEgjZzYMaRLHTJaeRhe7IX96bNSObvBQl0M7E0MiIRH+tporQH7vkw== X-Received: by 2002:a25:4ac9:0:b0:ba1:6bad:9270 with SMTP id x192-20020a254ac9000000b00ba16bad9270mr30465803yba.27.1684078127328; Sun, 14 May 2023 08:28:47 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-9d66-8b01-4e1e-2379.res6.spectrum.com. [2603:6081:7b00:6400:9d66:8b01:4e1e:2379]) by smtp.gmail.com with ESMTPSA id 192-20020a2503c9000000b00ba73c26f0d6sm1442328ybd.15.2023.05.14.08.28.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 May 2023 08:28:46 -0700 (PDT) Date: Sun, 14 May 2023 11:28:45 -0400 From: Tom Rini To: Sam Edwards Cc: u-boot@lists.denx.de Subject: Re: [PATCH 3/3] clang: Link with --no-pie instead of --apply-dynamic-relocs Message-ID: <20230514152845.GR2398826@bill-the-cat> References: <20230512230135.133162-1-CFSworks@gmail.com> <20230512230135.133162-3-CFSworks@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="k0fGXDN1dEhCAy48" Content-Disposition: inline In-Reply-To: <20230512230135.133162-3-CFSworks@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett 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 --k0fGXDN1dEhCAy48 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 12, 2023 at 05:01:35PM -0600, Sam Edwards wrote: > 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. >=20 > 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. >=20 > Signed-off-by: Sam Edwards > --- > Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/Makefile b/Makefile > index 20785860f7..d71127e412 100644 > --- a/Makefile > +++ b/Makefile > @@ -1024,7 +1024,7 @@ LDFLAGS_u-boot +=3D $(LDFLAGS_FINAL) > LDFLAGS_u-boot +=3D $(call ld-option, --no-dynamic-linker) > =20 > # ld.lld support > -LDFLAGS_u-boot +=3D -z notext $(call ld-option,--apply-dynamic-relocs) > +LDFLAGS_u-boot +=3D -z notext $(call ld-option,--no-pie) > =20 > LDFLAGS_u-boot +=3D --build-id=3Dnone > =20 How extensively have you tested this change? We don't install ld.lld in our container environment right now (but should..) and from some local testing I forget if we need to pass further make logic in to have ld.lld be used instead. --=20 Tom --k0fGXDN1dEhCAy48 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmRg/i0ACgkQFHw5/5Y0 tyxAPQv/Z2T4rWOsmyRItEL5PCwfTRR3S5dqrq4Q3VoqCxL4MhwFrHgypZ/j4MC7 j14ZLv+1pK6ttjlSTFq9hkY/Kt/pR06R+T4s/BEcjMJjb5uCMhuPAzVWyMfqaf+T jxS1798Y4qTLElCTzvajwwp8wjTPR4y4QAo8FlSOt9XIptUQQlE+cYl80d1si9gn ZCRVfxHvnl13MDuLih0qpLvs/RexagLdT8e5Pm545shm/50aplukh3yRxv886az9 BKrk55RqsyG5pKEL2xxRjeLXcbmrweqViM5UgACWBlZP55rIGbwuVDpi2wiR58dF qKB/RgNP8zsdLNGdjqmoa6ubIhp0ywcLG6hutO3rXCplvF3WIArWO77pTIPLpahj M0E/uXalJsU0AzAtLw1dYk+JfeWV5/vNNxRk765fcp81/Uvejz4IaIzUmx9sLI3k AdD/GiYsifJc4n3JRFs/wfHiZx91X82jeHN9arIkr3IT2IezYRaqqyJK8tju5YMx npqwrRAO =5erD -----END PGP SIGNATURE----- --k0fGXDN1dEhCAy48--