From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A9D492096106E for ; Mon, 7 May 2018 05:16:20 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 May 2018 05:16:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,373,1520924400"; d="scan'208";a="56594771" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga002.jf.intel.com with ESMTP; 07 May 2018 05:16:20 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 7 May 2018 05:16:19 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 7 May 2018 05:16:19 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.240]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.6]) with mapi id 14.03.0319.002; Mon, 7 May 2018 20:16:17 +0800 From: "Gao, Liming" To: "Marvin.Haeuser@outlook.com" , "edk2-devel@lists.01.org" CC: "Kinney, Michael D" Thread-Topic: [PATCH] MdePkg/BaseLib: Globally include ChkStk.c Thread-Index: AQHT5HzS0BO4vdQ7tUOW3NfrcoDhyqQkMQMA Date: Mon, 7 May 2018 12:16:17 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E225E45@SHSMSX104.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdePkg/BaseLib: Globally include ChkStk.c X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 May 2018 12:16:20 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Marvin: In VS compiler, what case will trig this intrinsic function? Thanks Liming > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ma= rvin H?user > Sent: Saturday, May 5, 2018 10:25 PM > To: edk2-devel@lists.01.org > Cc: Kinney, Michael D ; Gao, Liming > Subject: [edk2] [PATCH] MdePkg/BaseLib: Globally include ChkStk.c >=20 > Initially added for GCC build support, this patch includes the > function for all compilers and all architectures. This is done as > huge variables on the stack may cause the generation of calls to this > intrinsic function for Microsoft compilers, even for the IA32 > architecture, too. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Marvin Haeuser > --- > MdePkg/Library/BaseLib/{ChkStkGcc.c =3D> ChkStk.c} | 48 ++++++++++------= ---- > MdePkg/Library/BaseLib/BaseLib.inf | 4 +- > 2 files changed, 26 insertions(+), 26 deletions(-) >=20 > diff --git a/MdePkg/Library/BaseLib/ChkStkGcc.c b/MdePkg/Library/BaseLib/= ChkStk.c > similarity index 74% > rename from MdePkg/Library/BaseLib/ChkStkGcc.c > rename to MdePkg/Library/BaseLib/ChkStk.c > index ecba3853b159..59e6d73f9331 100644 > --- a/MdePkg/Library/BaseLib/ChkStkGcc.c > +++ b/MdePkg/Library/BaseLib/ChkStk.c > @@ -1,24 +1,24 @@ > -/** @file > - Provides hack function for passng GCC build. > - > - Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
> - This program and the accompanying materials > - are licensed and made available under the terms and conditions of the = BSD License > - which accompanies this distribution. The full text of the license may= be found at > - http://opensource.org/licenses/bsd-license.php. > - > - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR I= MPLIED. > - > -**/ > - > -#include "BaseLibInternals.h" > - > -/** > - Hack function for passing GCC build. > -**/ > -VOID > -__chkstk() > -{ > -} > - > +/** @file > + Provides hack function for passing build. > + > + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
> + This program and the accompanying materials > + are licensed and made available under the terms and conditions of the = BSD License > + which accompanies this distribution. The full text of the license may= be found at > + http://opensource.org/licenses/bsd-license.php. > + > + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR I= MPLIED. > + > +**/ > + > +#include "BaseLibInternals.h" > + > +/** > + Hack function for passing build. > +**/ > +VOID > +__chkstk() > +{ > +} > + > diff --git a/MdePkg/Library/BaseLib/BaseLib.inf b/MdePkg/Library/BaseLib/= BaseLib.inf > index 5fbbd02a94b6..d23a6db2581a 100644 > --- a/MdePkg/Library/BaseLib/BaseLib.inf > +++ b/MdePkg/Library/BaseLib/BaseLib.inf > @@ -1,7 +1,7 @@ > ## @file > # Base Library implementation. > # > -# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved. > +# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved. > # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved. > # Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.
> # > @@ -64,6 +64,7 @@ [Sources] > SafeString.c > String.c > FilePaths.c > + ChkStk.c > BaseLibInternals.h >=20 > [Sources.Ia32] > @@ -781,7 +782,6 @@ [Sources.X64] > X64/DisableCache.S | GCC > X64/RdRand.nasm| GCC > X64/RdRand.S | GCC > - ChkStkGcc.c | GCC >=20 > [Sources.IPF] > Ipf/AccessGp.s > -- > 2.17.0.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel