- Add the --prm flag to the GENFW_FLAGS
- Add the --no-gc-section to the linker flags so that apparently
unreferenced symbols are not prematurely removed from the .dll which
is used to generate the Prm module .efi.
- Force the linker to maintain the PrmModuleExportDescriptor symbol.
- Force the linker to maintain the PRM handler funtion's symbol.
Signed-off-by: Jose Marinho <jose.marinho@arm.com>
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
# code at OS runtime.\r
#\r
# Copyright (c) Microsoft Corporation\r
+# Copyright (c) 2022, Arm Limited. All rights reserved.<BR>\r
#\r
# SPDX-License-Identifier: BSD-2-Clause-Patent\r
#\r
[BuildOptions.common]\r
MSFT:*_*_*_DLINK_FLAGS = /DLL /SUBSYSTEM:CONSOLE /VERSION:1.0\r
MSFT:*_*_*_GENFW_FLAGS = --keepoptionalheader\r
+\r
+ GCC:*_*_AARCH64_GENFW_FLAGS = --prm\r
+ GCC:*_*_AARCH64_DLINK_FLAGS = -Wl,--no-gc-sections -Wl,--require-defined=PrmModuleExportDescriptor -Wl,--require-defined=CheckParamBufferPrmHandler\r
#\r
# Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>\r
# Copyright (c) Microsoft Corporation\r
+# Copyright (c) 2022, Arm Limited. All rights reserved.<BR>\r
#\r
# SPDX-License-Identifier: BSD-2-Clause-Patent\r
#\r
[BuildOptions.common]\r
MSFT:*_*_*_DLINK_FLAGS = /DLL /SUBSYSTEM:CONSOLE /VERSION:1.0\r
MSFT:*_*_*_GENFW_FLAGS = --keepoptionalheader\r
+\r
+ GCC:*_*_AARCH64_GENFW_FLAGS = --keepoptionalheader --prm\r
+ GCC:*_*_AARCH64_DLINK_FLAGS = -Wl,--no-gc-sections -Wl,--require-defined=PrmModuleExportDescriptor -Wl,--require-defined=CheckStaticDataBufferPrmHandler\r