From patchwork Wed Nov 22 10:07:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 119444 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp6489109qgn; Wed, 22 Nov 2017 02:07:45 -0800 (PST) X-Google-Smtp-Source: AGs4zMZCz3EjJP2QvTYQ16HZXMys80DhnTQSv4dJLM9wUiu2EBKx4gdQvpT81yo+zofTfKd7bT/v X-Received: by 10.159.240.138 with SMTP id p10mr20738930plr.360.1511345265877; Wed, 22 Nov 2017 02:07:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511345265; cv=none; d=google.com; s=arc-20160816; b=mhMQ8iJe255Dp86UdoA9pTjwDY3OE4tsDg2aO87DFnuA4W5PuSNnTOK71IRWQ5Yr4R LopJI7pPkX54wkccStk6KS1HtYl1Kyj/WJRNiNbL9e+9F+NN3JARokCprjSCe9Aoi0CW ZCHyQnmGulWhIotHVIORtP8nIAhV5NhDJKT0sIKYDFjoFH43P5K+1vHXaXizHiWwZ9x3 AvvCuEv3DZEBei+XvtHkxoku9Yz/eOuDVypJGK6pLAPaoTFDu8+z5ZMrowNXCF+N8vsD taCoi7gUfyJ+yGEYrIZQe4G7xCTN16vDKaCAuxk+SUjr77SZ2utyF5sKS1e9KMdlxXTp YsNg== 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=DmWFXnOPwxlBMLycyfSRvwejXeIKTM9e3cgwJDblYlg=; b=CkLZcUXHE4VIA1i4s/MiI3Wxk2MO8CeSU5bV3MwaVJw+eG6imuHibw3vKDkB1NSIvr 2P6Bxte5YIWuc1Kir7m0+XxKdQrx8V7+Y4KggqcQIO/zpOoTil+OGEJBY6JsNgSZmI2G 8KCYwnnRjKrY+1RIOMyxqPqx1b7Lu/ilOhYp9THGyQZim0wlmt8kGQ95Y5MshZKPwz0Q ZLUxUmjSwDziCmOShOst3QOHSCwlhVCcXGfMevuWQ4GbvWUYpfTmRtIJtB0mRa8FJy7A uC5cKUrYx46a6kw7pQeZ4sY+8TLS0Y1pfOfpuMQqn7JgsTSTfMM7PJbyWU+PlLHi1LY7 igqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=EWh6nELf; 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 l63si8870610plb.82.2017.11.22.02.07.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Nov 2017 02:07:45 -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=EWh6nELf; 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 52CC4220C160B; Wed, 22 Nov 2017 02:03:28 -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::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-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 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: [edk2] [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: , Cc: 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 Reviewed-by: Laszlo Ersek --- 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 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 ();