提交 2bdc6f57 编写于 作者: M Marek Behún 提交者: Tom Rini

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: NMarek Behún <marek.behun@nic.cz>
Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
上级 46c3e292
......@@ -217,8 +217,8 @@ extern const efi_guid_t efi_guid_firmware_management_protocol;
/* GUID for the ESRT */
extern const efi_guid_t efi_esrt_guid;
extern unsigned int __efi_runtime_start, __efi_runtime_stop;
extern unsigned int __efi_runtime_rel_start, __efi_runtime_rel_stop;
extern char __efi_runtime_start[], __efi_runtime_stop[];
extern char __efi_runtime_rel_start[], __efi_runtime_rel_stop[];
/**
* struct efi_open_protocol_info_item - open protocol info item
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册