From nobody Tue Feb 10 00:57:55 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+57133+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57133+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1586448596; cv=none; d=zohomail.com; s=zohoarc; b=IrntA2cFWnHPWr6vhIr5c5lF/BTctASVAJjvU+tawpfZ7RXxYfzNQjw6CzPDvXHfEGw5UIUB9Y3z0SOw6Ta8zUIJsc6YDPVK4zkKySpAuRfuHMGcwqzbWGtMpCUp5VTq3bNz6wuZszar5RPj8kUUH97Jq1vSfy4ACTa6IueGxKk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586448596; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=XgKLjwZPYNbUgSUDiezi0+OvBMrZAtwxoKgfQyyE3CQ=; b=jkVDXFCtio3md0/fkE3YLfuXFDhjDKaSaGBgxNg4G0fzBVikFkAeg2tK4bOBm2WPitc29lvcFgpkzco9rHIERLu7ErDRDjokoOiZlpnAQT7fxqEPwECrt/N7VcGwYrh26s1AyPVN3ionnJqtC+kwMusgUZqN29JatqeG+xZeh3U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57133+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1586448596185138.99972730808406; Thu, 9 Apr 2020 09:09:56 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id u2PdYY1788612xLA7FcK3vFl; Thu, 09 Apr 2020 09:09:55 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.12473.1586448595090282830 for ; Thu, 09 Apr 2020 09:09:55 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BDF867FA; Thu, 9 Apr 2020 09:09:54 -0700 (PDT) X-Received: from e123331-lin.home (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F06263F52E; Thu, 9 Apr 2020 09:09:53 -0700 (PDT) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: jian.j.wang@intel.com, hao.a.wu@intel.com, Ard Biesheuvel Subject: [edk2-devel] [PATCH 1/2] MdeModulePkg/DxeCore/Image: make local functions STATIC Date: Thu, 9 Apr 2020 18:09:47 +0200 Message-Id: <20200409160948.23427-2-ard.biesheuvel@arm.com> In-Reply-To: <20200409160948.23427-1-ard.biesheuvel@arm.com> References: <20200409160948.23427-1-ard.biesheuvel@arm.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ard.biesheuvel@arm.com X-Gm-Message-State: ERTw80kdHiwZVzR68GYIL9I5x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1586448595; bh=SbYPOKNW0ZQJRhkfGpLWK18O7Yb8KTo6UCgYw9X+2eU=; h=Cc:Date:From:Reply-To:Subject:To; b=c6TKgjt2eEwb2HdRnfndMGYnAX9Y55GY1+snNwkS73fkeuLEbw6Zt7XB+hQnonGRf6C U/wZhhmc0/fz2l9te2gfA7ffIf87/xXHUnvbiZuTci399enwgJCvaRQCdnjsED+EwaE5N 4I1Q2iHZGBA7jD3HFS6M3OgML77OMyowfS4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Use static linkage for functions that are only used locally, to help the compiler optimize away unused code in non-LTO builds. Signed-off-by: Ard Biesheuvel Reviewed-by: Bret Barkelew --- MdeModulePkg/Core/Dxe/Image/Image.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Im= age/Image.c index d86da89ee704..aae2c1eaa516 100644 --- a/MdeModulePkg/Core/Dxe/Image/Image.c +++ b/MdeModulePkg/Core/Dxe/Image/Image.c @@ -86,6 +86,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED MACHINE_TYPE_INFO mMachine= TypeInfo[] =3D { =20 UINT16 mDxeCoreImageMachineType =3D 0; =20 +#ifndef MDEPKG_NDEBUG /** Return machine type name. =20 @@ -93,6 +94,7 @@ UINT16 mDxeCoreImageMachineType =3D 0; =20 @return machine type name **/ +STATIC CHAR16 * GetMachineTypeName ( UINT16 MachineType @@ -108,6 +110,7 @@ GetMachineTypeName ( =20 return L""; } +#endif =20 /** Notification event handler registered by CoreInitializeImageServices () = to @@ -286,6 +289,7 @@ CoreInitializeImageServices ( into buffer. =20 **/ +STATIC EFI_STATUS EFIAPI CoreReadImageFile ( @@ -334,6 +338,7 @@ CoreReadImageFile ( @retval EFI_SUCCESS The memory range the image will be load= ed in is available @retval EFI_NOT_FOUND The memory range the image will be load= ed in is not available **/ +STATIC EFI_STATUS CheckAndMarkFixLoadingMemoryUsageBitMap ( IN EFI_PHYSICAL_ADDRESS ImageBase, @@ -407,6 +412,7 @@ CheckAndMarkFixLoadingMemoryUsageBitMap ( @retval EFI_NOT_FOUND The image has no assigned fixed loadin= g address. =20 **/ +STATIC EFI_STATUS GetPeCoffImageFixLoadingAssignedAddress( IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext @@ -552,6 +558,7 @@ CoreIsImageTypeSupported ( @retval EFI_BUFFER_TOO_SMALL Buffer for image is too small =20 **/ +STATIC EFI_STATUS CoreLoadPeImage ( IN BOOLEAN BootPolicy, @@ -877,6 +884,7 @@ CoreLoadPeImage ( @return Return the image private data associated with ImageHandle. =20 **/ +STATIC LOADED_IMAGE_PRIVATE_DATA * CoreLoadedImageInfo ( IN EFI_HANDLE ImageHandle @@ -909,6 +917,7 @@ CoreLoadedImageInfo ( @param FreePage Free allocated pages =20 **/ +STATIC VOID CoreUnloadAndCloseImage ( IN LOADED_IMAGE_PRIVATE_DATA *Image, @@ -1105,6 +1114,7 @@ CoreUnloadAndCloseImage ( platform policy specifies that the image= should not be started. =20 **/ +STATIC EFI_STATUS CoreLoadImageCommon ( IN BOOLEAN BootPolicy, --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#57133): https://edk2.groups.io/g/devel/message/57133 Mute This Topic: https://groups.io/mt/72900048/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-