|
|
67650e |
From 787b53a66cbbec6b10d47264b9eea9b24bc4e34c Mon Sep 17 00:00:00 2001
|
|
|
67650e |
From: Nigel Croxon <ncroxon@redhat.com>
|
|
|
67650e |
Date: Mon, 6 Nov 2017 09:34:14 -0500
|
|
|
67650e |
Subject: [PATCH 05/25] Add EFI_DRIVER_ENTRY_POINT support for MSVC/ARM64
|
|
|
67650e |
|
|
|
67650e |
Similar to what we do for other MSVC architectures.
|
|
|
67650e |
|
|
|
67650e |
Signed-off-by: Pete Batard <pete@akeo.ie>
|
|
|
67650e |
Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
|
|
|
67650e |
---
|
|
|
67650e |
inc/aarch64/efibind.h | 9 +++++++--
|
|
|
67650e |
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
|
67650e |
|
|
|
67650e |
diff --git a/inc/aarch64/efibind.h b/inc/aarch64/efibind.h
|
|
|
67650e |
index 182a2109062..bdaa5238e84 100644
|
|
|
67650e |
--- a/inc/aarch64/efibind.h
|
|
|
67650e |
+++ b/inc/aarch64/efibind.h
|
|
|
67650e |
@@ -115,9 +115,13 @@ typedef uint64_t UINTN;
|
|
|
67650e |
|
|
|
67650e |
//
|
|
|
67650e |
// When build similiar to FW, then link everything together as
|
|
|
67650e |
-// one big module.
|
|
|
67650e |
+// one big module. For the MSVC toolchain, we simply tell the
|
|
|
67650e |
+// linker what our driver init function is using /ENTRY.
|
|
|
67650e |
//
|
|
|
67650e |
-
|
|
|
67650e |
+#if defined(_MSC_EXTENSIONS)
|
|
|
67650e |
+#define EFI_DRIVER_ENTRY_POINT(InitFunction) \
|
|
|
67650e |
+ __pragma(comment(linker, "/ENTRY:" # InitFunction))
|
|
|
67650e |
+#else
|
|
|
67650e |
#define EFI_DRIVER_ENTRY_POINT(InitFunction) \
|
|
|
67650e |
UINTN \
|
|
|
67650e |
InitializeDriver ( \
|
|
|
67650e |
@@ -134,6 +138,7 @@ typedef uint64_t UINTN;
|
|
|
67650e |
EFI_SYSTEM_TABLE *systab \
|
|
|
67650e |
) __attribute__((weak, \
|
|
|
67650e |
alias ("InitializeDriver")));
|
|
|
67650e |
+#endif
|
|
|
67650e |
|
|
|
67650e |
#define LOAD_INTERNAL_DRIVER(_if, type, name, entry) \
|
|
|
67650e |
(_if)->LoadInternal(type, name, entry)
|
|
|
67650e |
--
|
|
|
67650e |
2.15.0
|
|
|
67650e |
|