summaryrefslogtreecommitdiffstats
path: root/PrmPkg
diff options
context:
space:
mode:
authorJose Marinho <jose.marinho@arm.com>2022-04-05 18:57:23 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-08-08 22:43:51 +0000
commit21200d9fe6d5b8078b93dbddfbcdf536308b67e4 (patch)
treedeb097f7e2fdd2489b3ca13a252e9038b9e1f5bb /PrmPkg
parent9f197e44b102a8d7d457d2cb4f54967681c858a9 (diff)
downloadedk2-21200d9fe6d5b8078b93dbddfbcdf536308b67e4.tar.gz
edk2-21200d9fe6d5b8078b93dbddfbcdf536308b67e4.tar.bz2
edk2-21200d9fe6d5b8078b93dbddfbcdf536308b67e4.zip
PrmPkg: Build Prm Samples with GCC for AARCH64
- 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>
Diffstat (limited to 'PrmPkg')
-rw-r--r--PrmPkg/Samples/PrmSampleAcpiParameterBufferModule/PrmSampleAcpiParameterBufferModule.inf4
-rw-r--r--PrmPkg/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.inf4
2 files changed, 8 insertions, 0 deletions
diff --git a/PrmPkg/Samples/PrmSampleAcpiParameterBufferModule/PrmSampleAcpiParameterBufferModule.inf b/PrmPkg/Samples/PrmSampleAcpiParameterBufferModule/PrmSampleAcpiParameterBufferModule.inf
index e8b71a970d..04addecc86 100644
--- a/PrmPkg/Samples/PrmSampleAcpiParameterBufferModule/PrmSampleAcpiParameterBufferModule.inf
+++ b/PrmPkg/Samples/PrmSampleAcpiParameterBufferModule/PrmSampleAcpiParameterBufferModule.inf
@@ -7,6 +7,7 @@
# code at OS runtime.
#
# Copyright (c) Microsoft Corporation
+# Copyright (c) 2022, Arm Limited. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -39,3 +40,6 @@
[BuildOptions.common]
MSFT:*_*_*_DLINK_FLAGS = /DLL /SUBSYSTEM:CONSOLE /VERSION:1.0
MSFT:*_*_*_GENFW_FLAGS = --keepoptionalheader
+
+ GCC:*_*_AARCH64_GENFW_FLAGS = --prm
+ GCC:*_*_AARCH64_DLINK_FLAGS = -Wl,--no-gc-sections -Wl,--require-defined=PrmModuleExportDescriptor -Wl,--require-defined=CheckParamBufferPrmHandler
diff --git a/PrmPkg/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.inf b/PrmPkg/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.inf
index b97af923c4..ff72a23366 100644
--- a/PrmPkg/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.inf
+++ b/PrmPkg/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.inf
@@ -7,6 +7,7 @@
#
# Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
# Copyright (c) Microsoft Corporation
+# Copyright (c) 2022, Arm Limited. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -42,3 +43,6 @@
[BuildOptions.common]
MSFT:*_*_*_DLINK_FLAGS = /DLL /SUBSYSTEM:CONSOLE /VERSION:1.0
MSFT:*_*_*_GENFW_FLAGS = --keepoptionalheader
+
+ GCC:*_*_AARCH64_GENFW_FLAGS = --keepoptionalheader --prm
+ GCC:*_*_AARCH64_DLINK_FLAGS = -Wl,--no-gc-sections -Wl,--require-defined=PrmModuleExportDescriptor -Wl,--require-defined=CheckStaticDataBufferPrmHandler