Skip to content

Commit 21200d9

Browse files
jmarinhomergify[bot]
authored andcommitted
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 <[email protected]> Signed-off-by: Sami Mujawar <[email protected]> Reviewed-by: Michael Kubacki <[email protected]> Reviewed-by: Ard Biesheuvel <[email protected]>
1 parent 9f197e4 commit 21200d9

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

PrmPkg/Samples/PrmSampleAcpiParameterBufferModule/PrmSampleAcpiParameterBufferModule.inf

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# code at OS runtime.
88
#
99
# Copyright (c) Microsoft Corporation
10+
# Copyright (c) 2022, Arm Limited. All rights reserved.<BR>
1011
#
1112
# SPDX-License-Identifier: BSD-2-Clause-Patent
1213
#
@@ -39,3 +40,6 @@
3940
[BuildOptions.common]
4041
MSFT:*_*_*_DLINK_FLAGS = /DLL /SUBSYSTEM:CONSOLE /VERSION:1.0
4142
MSFT:*_*_*_GENFW_FLAGS = --keepoptionalheader
43+
44+
GCC:*_*_AARCH64_GENFW_FLAGS = --prm
45+
GCC:*_*_AARCH64_DLINK_FLAGS = -Wl,--no-gc-sections -Wl,--require-defined=PrmModuleExportDescriptor -Wl,--require-defined=CheckParamBufferPrmHandler

PrmPkg/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.inf

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#
88
# Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
99
# Copyright (c) Microsoft Corporation
10+
# Copyright (c) 2022, Arm Limited. All rights reserved.<BR>
1011
#
1112
# SPDX-License-Identifier: BSD-2-Clause-Patent
1213
#
@@ -42,3 +43,6 @@
4243
[BuildOptions.common]
4344
MSFT:*_*_*_DLINK_FLAGS = /DLL /SUBSYSTEM:CONSOLE /VERSION:1.0
4445
MSFT:*_*_*_GENFW_FLAGS = --keepoptionalheader
46+
47+
GCC:*_*_AARCH64_GENFW_FLAGS = --keepoptionalheader --prm
48+
GCC:*_*_AARCH64_DLINK_FLAGS = -Wl,--no-gc-sections -Wl,--require-defined=PrmModuleExportDescriptor -Wl,--require-defined=CheckStaticDataBufferPrmHandler

0 commit comments

Comments
 (0)