From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web10.698.1571188257467338854 for ; Tue, 15 Oct 2019 18:10:57 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: jian.j.wang@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Oct 2019 18:10:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,301,1566889200"; d="scan'208";a="225616584" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 15 Oct 2019 18:10:57 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 15 Oct 2019 18:10:56 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 15 Oct 2019 18:10:56 -0700 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 15 Oct 2019 18:10:56 -0700 Received: from shsmsx107.ccr.corp.intel.com ([169.254.9.33]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.119]) with mapi id 14.03.0439.000; Wed, 16 Oct 2019 09:10:54 +0800 From: "Wang, Jian J" To: "devel@edk2.groups.io" , "Gao, Liming" Subject: Re: [edk2-devel] [Patch v2 09/11] CryptoPkg IntrinsicLib: Make _fltused always be used Thread-Topic: [edk2-devel] [Patch v2 09/11] CryptoPkg IntrinsicLib: Make _fltused always be used Thread-Index: AQHVgu9nrS5UHHmNuESEM957jU7o86dcdyqg Date: Wed, 16 Oct 2019 01:10:53 +0000 Message-ID: References: <1571099210-12432-1-git-send-email-liming.gao@intel.com> <1571099210-12432-10-git-send-email-liming.gao@intel.com> In-Reply-To: <1571099210-12432-10-git-send-email-liming.gao@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMDI5NzE3ZTYtY2U4Yy00N2U2LTljMTYtOWVhZDc4ZTc2Yjk0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiYkVMTzR3Y2piT3k3bFBlTmFhbnptWnlWZnl1WG5wOFM3QXVYbFlFNXBIRHlkTlpoWmJUNmo1R0hQcW9BK05CZyJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: jian.j.wang@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jian J Wang > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Liming Ga= o > Sent: Tuesday, October 15, 2019 8:27 AM > To: devel@edk2.groups.io > Subject: [edk2-devel] [Patch v2 09/11] CryptoPkg IntrinsicLib: Make _flt= used > always be used >=20 > With this change, global variable _fltused will not be removed by LTO >=20 > Signed-off-by: Liming Gao > --- > CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) >=20 > diff --git a/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c > b/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c > index 6e4d4a68cc..94fe341bec 100644 > --- a/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c > +++ b/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c > @@ -2,7 +2,7 @@ > Intrinsic Memory Routines Wrapper Implementation for OpenSSL-based > Cryptographic Library. >=20 > -Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
> +Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -13,9 +13,15 @@ SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > typedef UINTN size_t; >=20 > +#if defined(__GNUC__) || defined(__clang__) > + #define GLOBAL_USED __attribute__((used)) > +#else > + #define GLOBAL_USED > +#endif > + > /* OpenSSL will use floating point support, and C compiler produces the= _fltused > symbol by default. Simply define this symbol here to satisfy the lin= ker. */ > -int _fltused =3D 1; > +int GLOBAL_USED _fltused =3D 1; >=20 > /* Sets buffers to a specified character */ > void * memset (void *dest, int ch, size_t count) > -- > 2.13.0.windows.1 >=20 >=20 >=20