1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #ifndef SMMSTORETOOL__UDK2017_H__
4 #define SMMSTORETOOL__UDK2017_H__
6 #include <UDK2017/MdePkg/Include/Uefi/UefiBaseType.h>
7 #include <UDK2017/MdePkg/Include/Uefi/UefiMultiPhase.h>
8 #include <UDK2017/MdePkg/Include/Pi/PiFirmwareVolume.h>
9 #include <UDK2017/MdeModulePkg/Include/Guid/VariableFormat.h>
12 * ProcessorBind.h contains `#pragma GCC visibility push(hidden)` guarded by an
13 * identical condition, but there is no corresponding `pop` pragma. This can
14 * cause trouble for code following headers above including libc headers because
15 * linker suddenly considers declarations from them (e.g., `strcmp()`) to be
18 * In order to address this situation all UDK2017 headers used by this tool
19 * must be listed above and included indirectly through this header which
20 * restores default visibility.
22 * Mind that this issue appears only if the following conditions are satisfied
23 * and not all toolchains are configured to build position-independent code by
24 * default (as if -fpic or -fpie appears on compilation command-line).
26 #if defined(__GNUC__) && defined(__pic__) && !defined(USING_LTO)
27 #pragma GCC visibility pop
30 #endif // SMMSTORETOOL__UDK2017_H__