]> git.dujemihanovic.xyz Git - u-boot.git/commit
efi_loader: fix warning when linking with LTO
authorMarek Behún <marek.behun@nic.cz>
Thu, 20 May 2021 11:23:56 +0000 (13:23 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 24 May 2021 18:21:30 +0000 (14:21 -0400)
commit2bdc6f579b698ea32cf112310e903238d92a3c5a
treed4b155edfbe313c360d8a2113fd698d0d605beb8
parent46c3e29219e445de150e60e371cfec75f6fee524
efi_loader: fix warning when linking with LTO

When linking with LTO, the compiler complains about type mismatch of
variables `__efi_runtime_start`, `__efi_runtime_stop`,
`__efi_runtime_rel_start` and `__efi_runtime_rel_stop`:

 include/efi_loader.h:218:21: warning: type of ‘__efi_runtime_start’
                                       does not match original
                                       declaration [-Wlto-type-mismatch]
    218 | extern unsigned int __efi_runtime_start, __efi_runtime_stop;
        |                     ^
  arch/sandbox/lib/sections.c:7:6: note: ‘__efi_runtime_start’ was
                                         previously declared here
      7 | char __efi_runtime_start[0] __attribute__((section(".__efi_run
        |      ^

Change the type to char[] in include/efi_loader.h.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
include/efi_loader.h