From: "Christopher Zurcher" <christopher.zurcher@outlook.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"gaoliming@byosoft.com.cn" <gaoliming@byosoft.com.cn>,
'Ard Biesheuvel' <ardb@kernel.org>,
"'Yao, Jiewen'" <jiewen.yao@intel.com>
Cc: "'Feng, Bob C'" <bob.c.feng@intel.com>
Subject: Re: [edk2-devel] [PATCH v7 1/3] BaseTools: Remove COMMON section from the GCC discard list
Date: Fri, 6 Aug 2021 20:01:52 +0000 [thread overview]
Message-ID: <BY3PR06MB8018A2C46EDD66B0C5454E8CE4F39@BY3PR06MB8018.namprd06.prod.outlook.com> (raw)
In-Reply-To: <00c201d789b7$5358d4b0$fa0a7e10$@byosoft.com.cn>
Ard,
Is the removal of the COMMON section during the build not redundant to the -fno-common option? Do you expect cases where we will still see the undesired variable collisions?
Thanks,
Christopher Zurcher
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of gaoliming
Sent: Wednesday, August 4, 2021 22:04
To: 'Ard Biesheuvel' <ardb@kernel.org>; 'Yao, Jiewen' <jiewen.yao@intel.com>
Cc: devel@edk2.groups.io; christopher.zurcher@outlook.com; 'Feng, Bob C' <bob.c.feng@intel.com>
Subject: 回复: [edk2-devel] [PATCH v7 1/3] BaseTools: Remove COMMON section from the GCC discard list
Ard:
Chris explains this change in https://edk2.groups.io/g/devel/message/77662. And, he also verifies the patch in OVMF with GCC5 tool chain.
Thanks
Liming
> -----邮件原件-----
> 发件人: Ard Biesheuvel <ardb@kernel.org>
> 发送时间: 2021年8月4日 20:27
> 收件人: Yao, Jiewen <jiewen.yao@intel.com>
> 抄送: devel@edk2.groups.io; christopher.zurcher@outlook.com; Feng, Bob C
> <bob.c.feng@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>
> 主题: Re: [edk2-devel] [PATCH v7 1/3] BaseTools: Remove COMMON section
> from the GCC discard list
>
> On Wed, 21 Jul 2021 at 13:44, Yao, Jiewen <jiewen.yao@intel.com> wrote:
> >
> > Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
> >
>
> I don't think this is a good idea tbh. We have already identified that
> EDK2 code often fails to use the STATIC keyword when possible for
> global variables, and that unrelated variables that happen to have the
> same name will be collapsed into the same storage unit in the program
> image. (see commit 214a3b79417f64bf2faae74af42c1b9d23f50dc8 for
> details)
>
> Was this considered? Is this no longer an issue?
>
>
>
> > > -----Original Message-----
> > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> Christopher
> > > Zurcher
> > > Sent: Wednesday, July 21, 2021 6:07 AM
> > > To: devel@edk2.groups.io
> > > Cc: Ard Biesheuvel <ardb@kernel.org>; Feng, Bob C
> <bob.c.feng@intel.com>;
> > > Liming Gao <gaoliming@byosoft.com.cn>
> > > Subject: [edk2-devel] [PATCH v7 1/3] BaseTools: Remove COMMON
> section
> > > from the GCC discard list
> > >
> > > From: Christopher Zurcher <christopher.zurcher@microsoft.com>
> > >
> > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2507
> > >
> > > The COMMON section is used by OpenSSL assembly-optimized crypto
> > > functions. OpenSSL assembly code is auto-generated from the
> > > submodule and cannot be modified to remove dependence on the COMMON section.
> > > The default -fno-common compiler flag should still prevent
> > > variable from being emitted into the COMMON section.
> > >
> > > Cc: Ard Biesheuvel <ardb@kernel.org>
> > > Cc: Bob Feng <bob.c.feng@intel.com>
> > > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > > Signed-off-by: Christopher Zurcher
> > > <christopher.zurcher@microsoft.com>
> > > ---
> > > BaseTools/Scripts/GccBase.lds | 1 -
> > > 1 file changed, 1 deletion(-)
> > >
> > > diff --git a/BaseTools/Scripts/GccBase.lds
> b/BaseTools/Scripts/GccBase.lds
> > > index a9dd2138d4..83cebd29d5 100644
> > > --- a/BaseTools/Scripts/GccBase.lds
> > > +++ b/BaseTools/Scripts/GccBase.lds
> > > @@ -74,6 +74,5 @@ SECTIONS {
> > > *(.dynamic)
> > > *(.hash .gnu.hash)
> > > *(.comment)
> > > - *(COMMON)
> > > }
> > > }
> > > --
> > > 2.32.0.windows.1
> > >
> > >
> > >
> > >
> > >
> >
next prev parent reply other threads:[~2021-08-06 20:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210720220646.659-1-christopher.zurcher@outlook.com>
2021-07-20 22:06 ` [PATCH v7 1/3] BaseTools: Remove COMMON section from the GCC discard list Christopher Zurcher
2021-07-21 1:11 ` 回复: " gaoliming
2021-07-21 1:14 ` [edk2-devel] " Christopher Zurcher
2021-07-21 1:46 ` 回复: " gaoliming
2021-07-21 11:44 ` [edk2-devel] " Yao, Jiewen
2021-08-04 12:26 ` Ard Biesheuvel
2021-08-05 5:04 ` 回复: " gaoliming
2021-08-06 20:01 ` Christopher Zurcher [this message]
2021-07-20 22:06 ` [PATCH v7 2/3] CryptoPkg/OpensslLib: Add native instruction support for X64 Christopher Zurcher
2021-07-21 11:44 ` Yao, Jiewen
2021-07-20 22:06 ` [PATCH v7 3/3] CryptoPkg/OpensslLib: Commit the auto-generated assembly files " Christopher Zurcher
2021-07-21 11:44 ` Yao, Jiewen
2021-07-26 10:08 ` 回复: [edk2-devel] " gaoliming
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-list 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=BY3PR06MB8018A2C46EDD66B0C5454E8CE4F39@BY3PR06MB8018.namprd06.prod.outlook.com \
--to=devel@edk2.groups.io \
/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