grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] configure: Replace -Wl,-r,-d with -Wl,-r and add -fno-common


From: Daniel Kiper
Subject: Re: [PATCH] configure: Replace -Wl,-r,-d with -Wl,-r and add -fno-common
Date: Fri, 11 Feb 2022 19:36:54 +0100
User-agent: NeoMutt/20170113 (1.7.2)

On Fri, Feb 11, 2022 at 10:13:23AM -0800, Fangrui Song via Grub-devel wrote:
> In GNU ld and ld.lld, -d is used with -r to allocate space to COMMON symbols.
> This behavior is presumably to work around legacy projects which inspect
> relocatable output by themselves and do not handle COMMON symbols. grub does
> not do this.
>
> See https://github.com/llvm/llvm-project/issues/53660
> -d is quite useless and ld.lld 15.0.0 will make -d no-op.
>
> COMMON symbols have special symbol resolution semantics which can cause 
> surprise
> (see https://maskray.me/blog/2022-02-06-all-about-common-symbols). GCC<10 and
> Clang<11 defaulted to -fcommon. Just use -fno-common to avoid COMMON symbols.

Thank you for updating the patch.

Nit, missing Signed-off-by. May I add it on your behalf?

Otherwise Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>...

Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]