]> git.baikalelectronics.ru Git - uboot.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)
commit2b0427d74a30e2921277114846e5302693e50531
treed4b155edfbe313c360d8a2113fd698d0d605beb8
parentd227e59578c023bcbce7aa668ac68cda6bcd7b66
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