All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Ford <aford173@gmail.com>
To: "Marek Behún" <marek.behun@nic.cz>
Cc: Patrick DELAUNAY <patrick.delaunay@foss.st.com>,
	 U-Boot Mailing List <u-boot@lists.denx.de>,
	Tom Rini <trini@konsulko.com>,  Simon Glass <sjg@chromium.org>,
	Patrice CHOTARD <patrice.chotard@foss.st.com>,
	 Marek Vasut <marex@denx.de>,
	U-Boot STM32 <uboot-stm32@st-md-mailman.stormreply.com>
Subject: Re: Question: LTO and failing objcopy in "u-boot-initial-env" target
Date: Fri, 22 Oct 2021 14:49:17 -0500	[thread overview]
Message-ID: <CAHCN7xKB_QZU8=sNV4n_kyAX=LSjtqFM=1J-96Yom2NJJco0zA@mail.gmail.com> (raw)
In-Reply-To: <20211022212605.6ff8998a@thinkpad>

On Fri, Oct 22, 2021 at 2:26 PM Marek Behún <marek.behun@nic.cz> wrote:
>
> On Fri, 22 Oct 2021 14:19:16 -0500
> Adam Ford <aford173@gmail.com> wrote:
>
> > I am not sure it's the right solution, but it appears to work for me
> > on a board that uses LTO.  I didn't try it with a board that doesn't
> > use LTO.
>
> Need to be tested with GCC as well as Clang.

Agreed.

I turned off LTO, and got an error, so I updated the diff to:


diff --git a/Makefile b/Makefile
index 5194e4dc78..386180e935 100644
--- a/Makefile
+++ b/Makefile
@@ -2303,7 +2303,7 @@ endif
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost

 quiet_cmd_genenv = GENENV  $@
-cmd_genenv = $(OBJCOPY) --dump-section .rodata.default_environment=$@
env/common.o; \
+cmd_genenv = $(OBJCOPY) --dump-section `${OBJDUMP} env/common.o -t
|grep -m1 default_environment |awk '{print $$4}'`=$@ env/common.o; \
        sed --in-place -e 's/\x00/\x0A/g' $@

 u-boot-initial-env: u-boot.bin


It now appears to build without error with LTO enabled and disabled.

>
> Marek

  reply	other threads:[~2021-10-22 19:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22 15:16 Question: LTO and failing objcopy in "u-boot-initial-env" target Patrick DELAUNAY
2021-10-22 19:19 ` Adam Ford
2021-10-22 19:26   ` Marek Behún
2021-10-22 19:49     ` Adam Ford [this message]
2021-10-23 17:25       ` Tom Rini
2021-10-22 19:25 ` Marek Behún

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHCN7xKB_QZU8=sNV4n_kyAX=LSjtqFM=1J-96Yom2NJJco0zA@mail.gmail.com' \
    --to=aford173@gmail.com \
    --cc=marek.behun@nic.cz \
    --cc=marex@denx.de \
    --cc=patrice.chotard@foss.st.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-stm32@st-md-mailman.stormreply.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.