From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::241; helo=mail-wm0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 12A2D21B00DD4 for ; Fri, 17 Nov 2017 08:05:15 -0800 (PST) Received: by mail-wm0-x241.google.com with SMTP id r68so7494262wmr.3 for ; Fri, 17 Nov 2017 08:09:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/ZFPBiJLG3sYptaNjreo3zpVKelVxQrCTQmswfFSSo0=; b=IOeipAys4uBe8dL1a8YGTk6pbLnrXRSvoXElBYsSO/h5CMvPYKEi5PAfIZtcL+oPVk JmuGE7Y/Et3V60fpd4nXtJIp6eSZvEZ7rWr2qK3Q9k4ZAVhBHwh16r2uGtJg6BJb4vfI ZrPbd6sLL9hgh5AVZ7Q4/JLnSV6wewsnyXzQs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/ZFPBiJLG3sYptaNjreo3zpVKelVxQrCTQmswfFSSo0=; b=jOZqslx8cgUqCMJKzcSd1arsNFvNycME+m4bnipg6FLAto8dopNd6UhFovK22sEvFx iB9QdXet1wrTuq8WqgMnvxFF4PTfTVR+yAjpMKYjPUWJ+hDYyoG5ABUDu4wlArYBQYDB AoB0q5g7Czj2IZ55EqYs23LG2zpUcybIQDE5ZFXa664sXZrjs05Uu43zCoH7DxmaapHr QWwRYC26+23BHWjgz89Ne/A1LOv/4qzwDRwZZXfFr/8/pGlSFgvUjdxtFfPvpRzFm64L MfoQQ/A9Etjhht5SK/lgwI6KXWOySpnofsn8ze+9jx/5ElqoG+l5WXEEmAUZIR3VhryF QuXA== X-Gm-Message-State: AJaThX4OLFzysXM++cugtMSzEwSRunSS3hvUUjvrMCDxzB1JCrmehk0K +Fw9BjQaHDnctn4zEJPlMChmZAPfgaI= X-Google-Smtp-Source: AGs4zMYZoqM4xLsVctL2B5ShuxVA3pUwF6nbtCvLFJT6CaRc3Y3+auE1HFfmHmd1piEWxfBu1IIvsA== X-Received: by 10.28.131.2 with SMTP id f2mr4207961wmd.137.1510934965358; Fri, 17 Nov 2017 08:09:25 -0800 (PST) Received: from localhost.localdomain ([160.167.170.128]) by smtp.gmail.com with ESMTPSA id p42sm5575959wrb.28.2017.11.17.08.09.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Nov 2017 08:09:24 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Cc: leif.lindholm@linaro.org, Ard Biesheuvel Date: Fri, 17 Nov 2017 16:09:00 +0000 Message-Id: <20171117160913.17292-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171117160913.17292-1-ard.biesheuvel@linaro.org> References: <20171117160913.17292-1-ard.biesheuvel@linaro.org> Subject: [PATCH 02/15] ArmVirtPkg/PrePi: run all library constructors by hand X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 16:05:16 -0000 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 --- 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 (); -- 2.11.0