|
@@ -123,9 +123,13 @@ typedef uint32_t UINTN;
|
|
|
|
|
|
//
|
|
|
// When build similiar to FW, then link everything together as
|
|
|
-// one big module.
|
|
|
+// one big module. For the MSVC toolchain, we simply tell the
|
|
|
+// linker what our driver init function is using /ENTRY.
|
|
|
//
|
|
|
-
|
|
|
+#if defined(_MSC_EXTENSIONS)
|
|
|
+#define EFI_DRIVER_ENTRY_POINT(InitFunction) \
|
|
|
+ __pragma(comment(linker, "/ENTRY:" # InitFunction))
|
|
|
+#else
|
|
|
#define EFI_DRIVER_ENTRY_POINT(InitFunction) \
|
|
|
UINTN \
|
|
|
InitializeDriver ( \
|
|
@@ -142,6 +146,7 @@ typedef uint32_t UINTN;
|
|
|
EFI_SYSTEM_TABLE *systab \
|
|
|
) __attribute__((weak, \
|
|
|
alias ("InitializeDriver")));
|
|
|
+#endif
|
|
|
|
|
|
#define LOAD_INTERNAL_DRIVER(_if, type, name, entry) \
|
|
|
(_if)->LoadInternal(type, name, entry)
|