public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>,
	U-Boot Mailing List <u-boot@lists.denx.de>,
	Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>,
	Harald Seiler <hws@denx.de>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Jagan Teki <jagan@amarulasolutions.com>,
	Joe Hershberger <joe.hershberger@ni.com>,
	Marek Vasut <marex@denx.de>, Michael Walle <michael@walle.cc>,
	Michal Simek <michal.simek@amd.com>,
	Patrice Chotard <patrice.chotard@foss.st.com>,
	Patrick Delaunay <patrick.delaunay@foss.st.com>,
	Sjoerd Simons <sjoerd@collabora.com>, Stefan Roese <sr@denx.de>,
	Wolfgang Denk <wd@denx.de>
Subject: Re: [PATCH 17/31] sandbox: Allow weak symbols to be dropped
Date: Tue, 25 Apr 2023 18:31:02 +0200	[thread overview]
Message-ID: <20230425163102.text5vyisfwsn2h5@pali> (raw)
In-Reply-To: <CAEUhbmUN0e_m4GnGPJikU=_UQ_xgk4SdREpNc13+6iBa0Q41ww@mail.gmail.com>

On Tuesday 25 April 2023 10:44:17 Bin Meng wrote:
> Hi Simon,
> 
> On Tue, Apr 25, 2023 at 7:09 AM Simon Glass <sjg@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@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

You have selectany and external weaks support in PE format. For the
majority of weak function cases, this is enough. Cannot we use them?

  reply	other threads:[~2023-04-25 16:31 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-24 23:08 [PATCH 00/31] Allow building sandbox with MSYS2 Simon Glass
2023-04-24 23:08 ` [PATCH 01/31] patman: Declare the future Series memory Simon Glass
2023-04-24 23:08 ` [PATCH 02/31] u_boot_pylib: Correct name of readme Simon Glass
2023-04-24 23:08 ` [PATCH 03/31] u_boot_pylib: Make pty optional Simon Glass
2023-04-25 15:57   ` Tom Rini
2023-04-24 23:08 ` [PATCH 04/31] binman: Avoid using a symlink Simon Glass
2023-04-24 23:08 ` [PATCH 05/31] binman: Don't require a HOME directory Simon Glass
2023-04-24 23:08 ` [PATCH 06/31] pylibfdt: Allow building on Windows Simon Glass
2023-04-25 16:18   ` Pali Rohár
2023-04-24 23:08 ` [PATCH 07/31] Fix Makefile warning about parallel targets Simon Glass
2023-04-24 23:08 ` [PATCH 08/31] mkimage: Correct checking of configuration node Simon Glass
2023-04-24 23:08 ` [PATCH 09/31] Kbuild: Detect including an MSYS2 path Simon Glass
2023-04-24 23:08 ` [PATCH 10/31] sandbox: Provide a linker script for MSYS2 Simon Glass
2023-04-25 16:21   ` Pali Rohár
2023-04-25 18:01     ` Simon Glass
2023-04-25 18:11       ` Pali Rohár
2023-04-25 19:23         ` Simon Glass
2023-04-25 19:33           ` Pali Rohár
2023-04-26  0:50             ` Simon Glass
2023-04-26  7:13               ` Pali Rohár
2023-04-26  7:22                 ` Pali Rohár
2023-04-24 23:08 ` [PATCH 11/31] sandbox: Provide an EFI link script for PE Simon Glass
2023-04-24 23:08 ` [PATCH 12/31] sandbox: Drop dead code from Makefile Simon Glass
2023-04-24 23:08 ` [PATCH 13/31] sandbox: Disable raw Ethernet on MSYS2 Simon Glass
2023-04-24 23:08 ` [PATCH 14/31] sandbox: Drop signal handling for MSYS2 Simon Glass
2023-04-25  1:57   ` Heinrich Schuchardt
2023-04-24 23:08 ` [PATCH 15/31] sandbox: Correct SDL.h header inclusion Simon Glass
2023-04-24 23:08 ` [PATCH 16/31] sandbox: Include errno.h in the test header Simon Glass
2023-04-24 23:08 ` [PATCH 17/31] sandbox: Allow weak symbols to be dropped Simon Glass
2023-04-25  2:33   ` Heinrich Schuchardt
2023-04-29 18:41     ` Simon Glass
2023-04-25  2:44   ` Bin Meng
2023-04-25 16:31     ` Pali Rohár [this message]
2023-04-29 18:41       ` Simon Glass
2023-04-30  9:43         ` Pali Rohár
2023-04-29 18:41     ` Simon Glass
2023-04-30 15:10       ` Bin Meng
2023-04-24 23:08 ` [PATCH 18/31] sections: Drop use of linux/types.h Simon Glass
2023-04-24 23:08 ` [PATCH 19/31] sandbox: Drop incorrect inclusion " Simon Glass
2023-04-24 23:08 ` [PATCH 20/31] sandbox: Drop inclusion of os.h in sscanf.c Simon Glass
2023-04-24 23:08 ` [PATCH 21/31] test: Avoid strange symbols in the assembler file Simon Glass
2023-04-25  2:29   ` Heinrich Schuchardt
2023-04-24 23:08 ` [PATCH 22/31] sandbox: Fix up setting of monitor_len on MSYS2 Simon Glass
2023-04-24 23:08 ` [PATCH 23/31] ctype: Avoid using a symlink Simon Glass
2023-04-24 23:08 ` [PATCH 24/31] build: Disable weak symbols for MSYS2 Simon Glass
2023-04-25 16:21   ` Pali Rohár
2023-04-29 18:41     ` Simon Glass
2023-04-24 23:08 ` [PATCH 25/31] Makefile: Disable unsupported compiler options with PE Simon Glass
2023-04-25 15:59   ` Tom Rini
2023-04-25 16:22   ` Pali Rohár
2023-04-24 23:08 ` [PATCH 26/31] Makefile: Correct the ans1_compiler rule for MSYS2 Simon Glass
2023-04-25 16:23   ` Pali Rohár
2023-04-24 23:08 ` [PATCH 27/31] Makefile: Disable LTO when building with MSYS2 Simon Glass
2023-04-25 16:27   ` Pali Rohár
2023-04-26  1:04     ` Simon Glass
2023-04-26  7:07       ` Pali Rohár
2023-04-27 16:25         ` Simon Glass
2023-04-27 16:48           ` Pali Rohár
2023-04-27 17:34           ` Tom Rini
2023-04-28  7:37             ` Marek Behún
2023-04-28 13:03               ` Tom Rini
2023-04-24 23:08 ` [PATCH 28/31] doc: Update the MSYS2 packages and versions Simon Glass
2023-04-24 23:08 ` [PATCH 29/31] doc: Show how to build sandbox for MSYS2 Simon Glass
2023-04-25  2:20   ` Heinrich Schuchardt
2023-04-25  2:54   ` Heinrich Schuchardt
2023-04-25  3:01     ` Bin Meng
2023-04-25  3:12       ` Heinrich Schuchardt
2023-04-24 23:08 ` [PATCH 30/31] Makefile: Drop unwind tables Simon Glass
2023-04-24 23:08 ` [PATCH 31/31] CI: Enable sandbox build for Windows Simon Glass
2023-04-25  2:59 ` [PATCH 00/31] Allow building sandbox with MSYS2 Heinrich Schuchardt
2023-04-25 16:04   ` Tom Rini
2023-04-25 18:01     ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230425163102.text5vyisfwsn2h5@pali \
    --to=pali@kernel.org \
    --cc=ashok.reddy.soma@xilinx.com \
    --cc=bmeng.cn@gmail.com \
    --cc=hws@denx.de \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jagan@amarulasolutions.com \
    --cc=joe.hershberger@ni.com \
    --cc=marex@denx.de \
    --cc=michael@walle.cc \
    --cc=michal.simek@amd.com \
    --cc=patrice.chotard@foss.st.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=sjg@chromium.org \
    --cc=sjoerd@collabora.com \
    --cc=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    --cc=wd@denx.de \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox