Annotate module entry points with EFI_ENTRYPOINT so we can classify
the resulting symbol as global explicitly at link time.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org>
---
 MdePkg/Include/Library/DxeCoreEntryPoint.h                       | 1 +
 MdePkg/Include/Library/PeiCoreEntryPoint.h                       | 1 +
 MdePkg/Include/Library/PeimEntryPoint.h                          | 1 +
 MdePkg/Include/Library/UefiApplicationEntryPoint.h               | 1 +
 MdePkg/Include/Library/UefiDriverEntryPoint.h                    | 1 +
 MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c             | 1 +
 MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c             | 1 +
 MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c                   | 1 +
 MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c | 1 +
 MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c           | 1 +
 10 files changed, 10 insertions(+)

diff --git a/MdePkg/Include/Library/DxeCoreEntryPoint.h 
b/MdePkg/Include/Library/DxeCoreEntryPoint.h
index acf514a61665..a90b6b41d9dc 100644
--- a/MdePkg/Include/Library/DxeCoreEntryPoint.h
+++ b/MdePkg/Include/Library/DxeCoreEntryPoint.h
@@ -35,6 +35,7 @@ extern VOID  *gHobList;
 **/
 VOID
 EFIAPI
+EFI_ENTRYPOINT
 _ModuleEntryPoint (
   IN VOID  *HobStart
   );
diff --git a/MdePkg/Include/Library/PeiCoreEntryPoint.h 
b/MdePkg/Include/Library/PeiCoreEntryPoint.h
index 7485f7a40e98..8601a0b106e6 100644
--- a/MdePkg/Include/Library/PeiCoreEntryPoint.h
+++ b/MdePkg/Include/Library/PeiCoreEntryPoint.h
@@ -47,6 +47,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 **/
 VOID
 EFIAPI 
+EFI_ENTRYPOINT
 _ModuleEntryPoint(
   IN CONST  EFI_SEC_PEI_HAND_OFF    *SecCoreData,
   IN CONST  EFI_PEI_PPI_DESCRIPTOR  *PpiList
diff --git a/MdePkg/Include/Library/PeimEntryPoint.h 
b/MdePkg/Include/Library/PeimEntryPoint.h
index f4b752ef9609..b8b2928b087c 100644
--- a/MdePkg/Include/Library/PeimEntryPoint.h
+++ b/MdePkg/Include/Library/PeimEntryPoint.h
@@ -36,6 +36,7 @@ extern CONST UINT32       _gPeimRevision;
 **/
 EFI_STATUS
 EFIAPI
+EFI_ENTRYPOINT
 _ModuleEntryPoint (
   IN EFI_PEI_FILE_HANDLE       FileHandle,
   IN CONST EFI_PEI_SERVICES    **PeiServices
diff --git a/MdePkg/Include/Library/UefiApplicationEntryPoint.h 
b/MdePkg/Include/Library/UefiApplicationEntryPoint.h
index ec568ab6c5ad..9fe54aceceee 100644
--- a/MdePkg/Include/Library/UefiApplicationEntryPoint.h
+++ b/MdePkg/Include/Library/UefiApplicationEntryPoint.h
@@ -40,6 +40,7 @@ extern CONST UINT32        _gUefiDriverRevision;
 **/
 EFI_STATUS
 EFIAPI
+EFI_ENTRYPOINT
 _ModuleEntryPoint (
   IN EFI_HANDLE        ImageHandle,
   IN EFI_SYSTEM_TABLE  *SystemTable
diff --git a/MdePkg/Include/Library/UefiDriverEntryPoint.h 
b/MdePkg/Include/Library/UefiDriverEntryPoint.h
index f9d9befb9c12..107b6e45bd6e 100644
--- a/MdePkg/Include/Library/UefiDriverEntryPoint.h
+++ b/MdePkg/Include/Library/UefiDriverEntryPoint.h
@@ -57,6 +57,7 @@ extern CONST UINT8                    
_gDriverUnloadImageCount;
 **/
 EFI_STATUS
 EFIAPI
+EFI_ENTRYPOINT
 _ModuleEntryPoint (
   IN EFI_HANDLE        ImageHandle,
   IN EFI_SYSTEM_TABLE  *SystemTable
diff --git a/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c 
b/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c
index d3d8c4c47c51..ea71ab8d8eb6 100644
--- a/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c
+++ b/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c
@@ -39,6 +39,7 @@ VOID *gHobList = NULL;
 **/
 VOID
 EFIAPI
+EFI_ENTRYPOINT
 _ModuleEntryPoint (
   IN VOID  *HobStart
   )
diff --git a/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c 
b/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c
index 5662ccff15f0..eef27651c35a 100644
--- a/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c
+++ b/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c
@@ -56,6 +56,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 **/
 VOID
 EFIAPI 
+EFI_ENTRYPOINT
 _ModuleEntryPoint(
   IN CONST  EFI_SEC_PEI_HAND_OFF    *SecCoreData,
   IN CONST  EFI_PEI_PPI_DESCRIPTOR  *PpiList
diff --git a/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c 
b/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c
index 83a1bd8ccc32..201445ed69a8 100644
--- a/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c
+++ b/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c
@@ -34,6 +34,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 **/
 EFI_STATUS
 EFIAPI
+EFI_ENTRYPOINT
 _ModuleEntryPoint (
   IN EFI_PEI_FILE_HANDLE       FileHandle,
   IN CONST EFI_PEI_SERVICES    **PeiServices
diff --git a/MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c 
b/MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c
index dc05b23fd823..a7cdbfa13d89 100644
--- a/MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c
+++ b/MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c
@@ -38,6 +38,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 **/
 EFI_STATUS
 EFIAPI
+EFI_ENTRYPOINT
 _ModuleEntryPoint (
   IN EFI_HANDLE        ImageHandle,
   IN EFI_SYSTEM_TABLE  *SystemTable
diff --git a/MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c 
b/MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c
index f5da5ac4ad10..a14874df2bea 100644
--- a/MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c
+++ b/MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c
@@ -92,6 +92,7 @@ _DriverUnloadHandler (
 **/
 EFI_STATUS
 EFIAPI
+EFI_ENTRYPOINT
 _ModuleEntryPoint (
   IN EFI_HANDLE        ImageHandle,
   IN EFI_SYSTEM_TABLE  *SystemTable
-- 
2.17.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to