Question: LTO and failing objcopy in "u-boot-initial-env" target
Marek Behún
marek.behun at nic.cz
Fri Oct 22 21:25:03 CEST 2021
On Fri, 22 Oct 2021 17:16:18 +0200
Patrick DELAUNAY <patrick.delaunay at foss.st.com> wrote:
> Hi,
>
>
> I made tests with LTO option activated on stm32mp15 boards but if have a
> issue
>
> with the U-Boot target "u-boot-initial-env" (this command used by YOCTO)
>
>
> $> make u-boot-initial-env
>
> ...
>
> GENENV u-boot-initial-env
> arm-none-linux-gnueabihf-objcopy: env/common.o: can't dump section
> '.rodata.default_environment' - it does not exist: file format not
> recognized
> sed: can't read u-boot-initial-env: No such file or directory
> make[1]: *** [/local/home/frq07632/views/u-boot/Makefile:2315:
> u-boot-initial-env] Error 2
> make[1]: Leaving directory
> '/local/home/frq07632/views/build/stm32mp15_defconfig'
> make: *** [Makefile:177: sub-make] Error 2
>
>
> But I reproduced it with sandbox:
>
> $> make sandbox_defconfig
>
> $> make all
>
> $> make u-boot-initial-env
>
> ....
>
> LTO u-boot
> OBJCOPY u-boot-nodtb.bin
> COPY u-boot.bin
> GENENV u-boot-initial-env
> objcopy: env/common.o: can't dump section '.rodata.default_environment'
> - it does not exist: file format not recognized
> sed: can't read u-boot-initial-env: No such file or directory
> make: *** [Makefile:2315: u-boot-initial-env] Error 2
>
>
>
> Do you already know this issue for other board which activate the LTO
> feature ?
>
> I don't see any remarks about this issue on mailing list.
>
> Today I am known how to solve this issue.
>
>
> PS: The same command is executed in "scripts/get_default_envs.sh"
Seems that that script isn't executed in code integration, otherwise I
would have noticed this.
More information about the U-Boot
mailing list