CryptoPkg IntrinsicLib: Make _fltused always be used

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1603
With this change, global variable _fltused will not be removed by LTO

Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
This commit is contained in:
Liming Gao 2019-10-17 14:55:53 +08:00
parent 3d61650f95
commit 933681b208
1 changed files with 8 additions and 2 deletions

View File

@ -2,7 +2,7 @@
Intrinsic Memory Routines Wrapper Implementation for OpenSSL-based
Cryptographic Library.
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -13,9 +13,15 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
typedef UINTN size_t;
#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 linker. */
int _fltused = 1;
int GLOBAL_USED _fltused = 1;
/* Sets buffers to a specified character */
void * memset (void *dest, int ch, size_t count)