]> git.proxmox.com Git - mirror_edk2.git/commitdiff
PrmPkg: Build Prm Samples with GCC for AARCH64
authorJose Marinho <jose.marinho@arm.com>
Tue, 5 Apr 2022 17:57:23 +0000 (18:57 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 8 Aug 2022 22:43:51 +0000 (22:43 +0000)
- 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>
PrmPkg/Samples/PrmSampleAcpiParameterBufferModule/PrmSampleAcpiParameterBufferModule.inf
PrmPkg/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.inf

index e8b71a970d83d44485430c2e3dc24e1a80da75c8..04addecc861e643cbb2be07e995708b42059719c 100644 (file)
@@ -7,6 +7,7 @@
 #  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
@@ -39,3 +40,6 @@
 [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
index b97af923c47a70b280d270302aa8a7d058701c92..ff72a233669657c260f284cd2fbc4126077d4426 100644 (file)
@@ -7,6 +7,7 @@
 #\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
@@ -42,3 +43,6 @@
 [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