[PATCH 17/31] sandbox: Allow weak symbols to be dropped

Bin Meng bmeng.cn at gmail.com
Tue Apr 25 04:44:17 CEST 2023


Hi Simon,

On Tue, Apr 25, 2023 at 7:09 AM Simon Glass <sjg at chromium.org> wrote:
>
> The sandbox build makes use of a small number of weak symbols. Allow these
> to be dropped when building for the PE format, since its support for weak
> symbols is poor.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
>  cmd/bootefi.c                     | 3 ++-
>  cmd/bootz.c                       | 3 +++
>  common/usb.c                      | 3 +++
>  drivers/core/root.c               | 3 +++
>  drivers/spi/sandbox_spi.c         | 3 +++
>  env/env.c                         | 6 ++++++
>  lib/efi_loader/efi_image_loader.c | 3 +++
>  lib/efi_loader/efi_runtime.c      | 4 ++++
>  lib/lmb.c                         | 4 +++-
>  lib/time.c                        | 3 +++
>  10 files changed, 33 insertions(+), 2 deletions(-)
>

You probably need to use:

__declspec(selectany)

to replace __weak in the ELF for the *nix world.

Note this Microsoft bizarre does not provide the "strong override
weak" effect but I suspect what you only need is to get the build pass
on Windows so it should be okay.

Regards,
Bin


More information about the U-Boot mailing list