summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/C/Include
diff options
context:
space:
mode:
authorHuang, Li-Xia <lisa.huang@intel.com>2022-03-14 13:27:21 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-03-16 07:48:26 +0000
commit414cd2a4d536b444acee3fcdbe33bd0c8ef9819b (patch)
treeddfe1c9722fbc8ca870ca69147f0abff6c60d18a /BaseTools/Source/C/Include
parentc8ea48bdf95532f9a3a4c39a154c09988566901f (diff)
downloadedk2-414cd2a4d536b444acee3fcdbe33bd0c8ef9819b.tar.gz
edk2-414cd2a4d536b444acee3fcdbe33bd0c8ef9819b.tar.bz2
edk2-414cd2a4d536b444acee3fcdbe33bd0c8ef9819b.zip
BaseTools/GenFw: Enhance GenFw to support PRM GCC build
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3802 Since PRM module needs to support export table in PE-COFF, we'll enhance GenFw tool to support this. Add one export flag in GenFw tool. If export flag is set: Step1: Scan ELF symbol table based on PRM module descriptor to get descriptor offset address; Step2: Find PRM handlers number and name in COFF file based on the address from step1; Step3: Write PRM info such as handler name and export RVA into COFF export table. PRM option currently only supports DXE RUNTIME driver and X64 arch. Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Lixia Huang <lisa.huang@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools/Source/C/Include')
-rw-r--r--BaseTools/Source/C/Include/IndustryStandard/PeImage.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/BaseTools/Source/C/Include/IndustryStandard/PeImage.h b/BaseTools/Source/C/Include/IndustryStandard/PeImage.h
index f17b8ee19b..21c968e650 100644
--- a/BaseTools/Source/C/Include/IndustryStandard/PeImage.h
+++ b/BaseTools/Source/C/Include/IndustryStandard/PeImage.h
@@ -571,6 +571,13 @@ typedef struct {
UINT32 AddressOfNameOrdinals;
} EFI_IMAGE_EXPORT_DIRECTORY;
+//
+// Based export types.
+//
+#define EFI_IMAGE_EXPORT_ORDINAL_BASE 1
+#define EFI_IMAGE_EXPORT_ADDR_SIZE 4
+#define EFI_IMAGE_EXPORT_ORDINAL_SIZE 2
+
///
/// DLL support.
/// Import Format