From patchwork Fri Nov 17 16:09:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 119174 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp703066qgn; Fri, 17 Nov 2017 08:09:30 -0800 (PST) X-Google-Smtp-Source: AGs4zMY178UckdKt4gBLdDIa80acLq5rlJodFz2TLqdpgs4re45LIe8XdrLhwblFkhubk/0Smzud X-Received: by 10.99.8.5 with SMTP id 5mr5592876pgi.28.1510934970051; Fri, 17 Nov 2017 08:09:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510934970; cv=none; d=google.com; s=arc-20160816; b=nOjqBMJrCZR6IDnPPGiKZZwwmAg2Rh7l5KA5rc7EhhOGmTt2KOEBpe53c2Z8KViI6m 07ISE6831GT6tW66RCHsnH58YGrnIcJJCZ45JJwvRuPzrkrWcV6eJWmTvWW3I31A5CrX QNkC47GYO4nUuxZLoOHb3BwW6l+aSj9srPBViQjlqfz9KsRjQTVGlSGKDZjwLLFuG8iD 9nbcL9dEt4vyXMJOHXEpnoYz1mbSY20YpUwGe0z9762cSWxyS4pvFaZaSSZ6PuN3/VYN BzzCGtsOU+JtXelAgxY3Oh4wEK9rrZZO5feR+odQLUAV2OIh6191qp46XhpS2gPx8Oj8 UCww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=FdCa1wp/ouHixoykV4Nnwj8ftjxp8ODWYsszlevGz7s=; b=JHR3gxDerxnoEzwU/XxJL3crSJnwIjpf2eBpx9+TvYQscd9mDoY6xu6O23QRv47X7K tcX3dU8zvNWIRCauaEfneEuUUqXy5ZyoOadtnZ0CHoHD0Ne8WBFpfXHohCBIvroMACfX wWLg73HKPJOOpQ+VNwyBb9eE3T5ReCgptgg0icfFwSe3swkuAshtC+f5nTjxJUn9Zd6N iyLrf4NRwGFXQEF7XX3auEMj8ySER+7hS1dAisvlVol1bYxH57vUdUtIfaBxbzwzRXYY oNLsa9D+rHOPaU7kmtYWRRUcH4dngEnvcrcxNlWXQ6l+mNmAjqDfVLGjp7YNREG3d5YT jfMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=IOeipAys; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id h185si3284987pfb.382.2017.11.17.08.09.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Nov 2017 08:09:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=IOeipAys; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0241921B00DDB; Fri, 17 Nov 2017 08:05:18 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org 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-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 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: [edk2] [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: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Laszlo Ersek 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 ();