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::243; helo=mail-wm0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (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 3A673220C1600 for ; Wed, 22 Nov 2017 02:03:26 -0800 (PST) Received: by mail-wm0-x243.google.com with SMTP id u83so9121057wmb.5 for ; Wed, 22 Nov 2017 02:07:42 -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=tCVf7Xxj5oi0a27cDasuipmoXeaGA+MellLzjuBNZvs=; b=EWh6nELfjIgPVc7gw6LkVqUr4oXzCIK4CyDRBuN3RA3pmOiP3RRn93YT9PyEy7NZgS SJoB9TYbzHytfTgqqTeGJsKahkzL9oDAbJjzi9H5+dcdiKEk3gtfDA0b6NbyoaziXqK4 CwJX8ETfFnyd11FcxZojFnJFCulXsA1PD8XcA= 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=tCVf7Xxj5oi0a27cDasuipmoXeaGA+MellLzjuBNZvs=; b=iaYZ6zfYRLHl4KyNgJo8q2TpXQNwdcAlmzXd21JiBifF+qGlwmDnoA+nyKDooJHMkx 2xWbwqG/vjdNJpFC4g3kxSc+EU+4l+QfT4+f+O27g17uVaOBtbQorJd6VyKT10fRQ+f3 e8lPzYjNu/FF1V68ZISlVqtj3xBYwpKvXU5in/jGxLVRmy+6ZaqpZ+Y0quy/GUGzA09v Fn0jgPToaG0PmbTL0XqRzhjAfUXiRP2KCaFgVv9wo+BFYoaUlBH+FqeiXUogqganpGrz 9DXmzja45329dEbOMwdFumhRPt4rTX7ur2evBr0NiSUc2D4DjscIzV8ra7fcQGVikukO xPKA== X-Gm-Message-State: AJaThX5Qdg0pchBtB0R1QzPnKHlVCCWa86dH5jV/oHRwCzh9L0XFx0aM 7KUW314a5umNbz1FiuLEY/gUdRByZgI= X-Google-Smtp-Source: AGs4zMaeJCwV/ZKCp7aEcL7NXhwIlbyDHBmqshpXcUeksJFEJ2ymXvtVAEh8h3WrsJO5dQYGuAmBng== X-Received: by 10.28.34.67 with SMTP id i64mr3674271wmi.57.1511345260856; Wed, 22 Nov 2017 02:07:40 -0800 (PST) Received: from localhost.localdomain ([154.145.25.106]) by smtp.gmail.com with ESMTPSA id i192sm2761457wmf.46.2017.11.22.02.07.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Nov 2017 02:07:39 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Cc: Ard Biesheuvel Date: Wed, 22 Nov 2017 10:07:18 +0000 Message-Id: <20171122100731.24525-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171122100731.24525-1-ard.biesheuvel@linaro.org> References: <20171122100731.24525-1-ard.biesheuvel@linaro.org> Subject: [PATCH v2 01/14] 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: Wed, 22 Nov 2017 10:03:26 -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 Reviewed-by: Laszlo Ersek --- 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