diff mbox series

[edk2,02/15] ArmVirtPkg/PrePi: run all library constructors by hand

Message ID 20171117160913.17292-3-ard.biesheuvel@linaro.org
State Superseded
Headers show
Series ArmVirtPkg: get rid of ArmPlatformLib | expand

Commit Message

Ard Biesheuvel Nov. 17, 2017, 4:09 p.m. UTC
Instead of invoking the library constructors of some libraries by
hand, invoke the generated function ProcessLibraryConstructorList
in AutoGen.c so all constructors are executed.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 ArmVirtPkg/PrePi/PrePi.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

-- 
2.11.0

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

Comments

Laszlo Ersek Nov. 21, 2017, 3:32 p.m. UTC | #1
On 11/17/17 17:09, Ard Biesheuvel wrote:
> Instead of invoking the library constructors of some libraries by

> hand, invoke the generated function ProcessLibraryConstructorList

> in AutoGen.c so all constructors are executed.

> 

> Contributed-under: TianoCore Contribution Agreement 1.1

> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---

>  ArmVirtPkg/PrePi/PrePi.c | 13 +++----------

>  1 file changed, 3 insertions(+), 10 deletions(-)

> 

> diff --git a/ArmVirtPkg/PrePi/PrePi.c b/ArmVirtPkg/PrePi/PrePi.c

> index c69cff249e80..3679087aec4d 100755

> --- a/ArmVirtPkg/PrePi/PrePi.c

> +++ b/ArmVirtPkg/PrePi/PrePi.c

> @@ -29,15 +29,9 @@

>  #include "PrePi.h"

>  #include "LzmaDecompress.h"

>  

> -EFI_STATUS

> -EFIAPI

> -ExtractGuidedSectionLibConstructor (

> -  VOID

> -  );

> -

> -EFI_STATUS

> +VOID

>  EFIAPI

> -LzmaDecompressLibConstructor (

> +ProcessLibraryConstructorList (

>    VOID

>    );

>  

> @@ -125,8 +119,7 @@ PrePiMain (

>    PERF_START (NULL, "PEI", NULL, StartTimeStamp);

>  

>    // SEC phase needs to run library constructors by hand.

> -  ExtractGuidedSectionLibConstructor ();

> -  LzmaDecompressLibConstructor ();

> +  ProcessLibraryConstructorList ();

>  

>    // Build HOBs to pass up our version of stuff the DXE Core needs to save space

>    BuildPeCoffLoaderHob ();

> 


Reviewed-by: Laszlo Ersek <lersek@redhat.com>

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

Patch

diff --git a/ArmVirtPkg/PrePi/PrePi.c b/ArmVirtPkg/PrePi/PrePi.c
index c69cff249e80..3679087aec4d 100755
--- a/ArmVirtPkg/PrePi/PrePi.c
+++ b/ArmVirtPkg/PrePi/PrePi.c
@@ -29,15 +29,9 @@ 
 #include "PrePi.h"
 #include "LzmaDecompress.h"
 
-EFI_STATUS
-EFIAPI
-ExtractGuidedSectionLibConstructor (
-  VOID
-  );
-
-EFI_STATUS
+VOID
 EFIAPI
-LzmaDecompressLibConstructor (
+ProcessLibraryConstructorList (
   VOID
   );
 
@@ -125,8 +119,7 @@  PrePiMain (
   PERF_START (NULL, "PEI", NULL, StartTimeStamp);
 
   // SEC phase needs to run library constructors by hand.
-  ExtractGuidedSectionLibConstructor ();
-  LzmaDecompressLibConstructor ();
+  ProcessLibraryConstructorList ();
 
   // Build HOBs to pass up our version of stuff the DXE Core needs to save space
   BuildPeCoffLoaderHob ();