From patchwork Tue Jun 12 15:23:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 138368 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp5491320lji; Tue, 12 Jun 2018 08:24:11 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKZGiMUJn+A+C+xG4X8D2t4jvZanNDsJE9Ej2E/c/ox4Gh1nV426Zb4iU8XEW3EKNiYRu0l X-Received: by 2002:a63:7b51:: with SMTP id k17-v6mr703921pgn.55.1528817050952; Tue, 12 Jun 2018 08:24:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528817050; cv=none; d=google.com; s=arc-20160816; b=q5LR0Acs7PDnJBJy064OO8okbQ4kPa6Gkvia/EDPvFUW8MXpOJyP3imUjcdwTiiFRN LAWeCbBwjIRmRSsyd64vOcjlq+0ttSp1Zxa7mZnIiXUfvkPwvMCRtA1Ku3OzlGgfWW4S efJDbDIeB6HDhEa3pJTHJgyCaFrltuT+ikUoQYVvx0PO+Ioi257/ZRlZcoS4aGrObhWA Jt6MJLbzQffVy8hWRhDfts+P9DTTtXJJLV3qjY71UrjFECdtsAMEk6308Ti5u024oEhw rnQcEUxTWlzg7w0+tingXruicjY4gjqluY5nEFTKz6YdG/hy3ivQV2Y0foBEilhP3te1 c1mQ== 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=RLUY8mnVzrA1dNccCsPHf5EKuaC10QK/0lEFEZmj7Js=; b=GCWgMeH22G0/4qM+RJjcRTHRfOTOGlpYJrdViXDpz7rMJDaA5cwEzu4cGXcodFWH9K bJtCd9gx8uF89qIZ7CW3RHDZb9PYll8wvnuy5KA1q6LyaREYMMDme7TeoIubdQn2nee2 3BF9FGNsmAEIjdfflLn40ytVqXY7w8EFytRCz1VltFAQ5w/yvPCT//ioI1o9DWhmM/ib hbvtQbNtkUeZqyhKDxaQ4F2X1k4RHCQFsuXpdSnnTzdBSLx0GATlOGLLwNno5Ap4Vyda Yz1NrqIThveD/Ni5dsgYGKxiLCo4SVPJEwQEeOJhltosAV56DDLLYbS4czV3Xe2sBXA3 mYRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=L5OGlwsk; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 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. [198.145.21.10]) by mx.google.com with ESMTPS id cf13-v6si407975plb.175.2018.06.12.08.24.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jun 2018 08:24:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=L5OGlwsk; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 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 130C321295CA6; Tue, 12 Jun 2018 08:23:39 -0700 (PDT) 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:c0c::236; helo=mail-wr0-x236.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x236.google.com (mail-wr0-x236.google.com [IPv6:2a00:1450:400c:c0c::236]) (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 60AE621295C89 for ; Tue, 12 Jun 2018 08:23:37 -0700 (PDT) Received: by mail-wr0-x236.google.com with SMTP id e18-v6so16278540wrs.5 for ; Tue, 12 Jun 2018 08:23:37 -0700 (PDT) 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=bmlLfwe9xJbG+wLg3ZNVfcOHjtLPYIx/4cRcfxE8Vdw=; b=L5OGlwsk+Y71JPLzUgNEvO912i0NH0k36x5YhUyHnQskRyvWzWjvlQqEXOqIilNi8k IffDakgcqnnEkGdRZ+MBpv9nd2HgRCWfGSxobfmggC6jpOnSaUMJ0mSDJ/WM4lHrpq52 v3GpIwWTetr/P+Z0pBVe/Vy5/JMQH17Ds6shQ= 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=bmlLfwe9xJbG+wLg3ZNVfcOHjtLPYIx/4cRcfxE8Vdw=; b=izSDFSKDU5Gptspsvvx9d7SBSQ4sFyunZsXBNnFq2NgaIvm9R7FZlhaIvqoCB9ueOC xGllwbhMBk8j9/LqlX8dFNJ4OSEZjL9lY1GsJO94oxkGEFHFDQtqxcokeFFeESXAXn/x 41AUubhxwxSRySKWB7a2P8RXbIXoAYLcLd3K8ovaxXgbp2KMMnzbLmGCyZt8IMPnAlp/ CP6B0g7p0020B2HAt2vitkSyLAN/hIoNYFiGB58CBmr+uW3s0eFlETIPNnFfPB9mjrH7 SXLt4d7wUkmRzPnH0jTlOm4NilnFlijupKIIeMkmzK29op1VirRUvAu3f5VVBhOJFxhl //xQ== X-Gm-Message-State: APt69E2kaAWGt2O64ejdBQAOOeQhQuDxPb7fMkodgBjgRQeoAOmm4HjA 499abwniv3128U0kSAzvrwEyES6k2Ik= X-Received: by 2002:adf:a54a:: with SMTP id j10-v6mr709832wrb.155.1528817015592; Tue, 12 Jun 2018 08:23:35 -0700 (PDT) Received: from dogfood.home ([2a01:cb1d:112:6f00:3c84:18ae:27f2:d03]) by smtp.gmail.com with ESMTPSA id e2-v6sm500983wro.97.2018.06.12.08.23.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jun 2018 08:23:34 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Tue, 12 Jun 2018 17:23:03 +0200 Message-Id: <20180612152306.25998-9-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180612152306.25998-1-ard.biesheuvel@linaro.org> References: <20180612152306.25998-1-ard.biesheuvel@linaro.org> Subject: [edk2] [RFC PATCH 08/11] MdePkg: annotate module entry points with EFI_ENTRYPOINT X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ruiyu Ni , Eric Dong , Ard Biesheuvel , Hao Wu , Jordan Justen , Andrew Fish , Leif Lindholm , Liming Gao , Zenith432 , Michael D Kinney , Laszlo Ersek , Star Zeng MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Annotate module entry points with EFI_ENTRYPOINT so we can classify the resulting symbol as global explicitly at link time. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- MdePkg/Include/Library/DxeCoreEntryPoint.h | 1 + MdePkg/Include/Library/PeiCoreEntryPoint.h | 1 + MdePkg/Include/Library/PeimEntryPoint.h | 1 + MdePkg/Include/Library/UefiApplicationEntryPoint.h | 1 + MdePkg/Include/Library/UefiDriverEntryPoint.h | 1 + MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c | 1 + MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c | 1 + MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c | 1 + MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c | 1 + MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c | 1 + 10 files changed, 10 insertions(+) -- 2.17.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/MdePkg/Include/Library/DxeCoreEntryPoint.h b/MdePkg/Include/Library/DxeCoreEntryPoint.h index acf514a61665..a90b6b41d9dc 100644 --- a/MdePkg/Include/Library/DxeCoreEntryPoint.h +++ b/MdePkg/Include/Library/DxeCoreEntryPoint.h @@ -35,6 +35,7 @@ extern VOID *gHobList; **/ VOID EFIAPI +EFI_ENTRYPOINT _ModuleEntryPoint ( IN VOID *HobStart ); diff --git a/MdePkg/Include/Library/PeiCoreEntryPoint.h b/MdePkg/Include/Library/PeiCoreEntryPoint.h index 7485f7a40e98..8601a0b106e6 100644 --- a/MdePkg/Include/Library/PeiCoreEntryPoint.h +++ b/MdePkg/Include/Library/PeiCoreEntryPoint.h @@ -47,6 +47,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ VOID EFIAPI +EFI_ENTRYPOINT _ModuleEntryPoint( IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData, IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList diff --git a/MdePkg/Include/Library/PeimEntryPoint.h b/MdePkg/Include/Library/PeimEntryPoint.h index f4b752ef9609..b8b2928b087c 100644 --- a/MdePkg/Include/Library/PeimEntryPoint.h +++ b/MdePkg/Include/Library/PeimEntryPoint.h @@ -36,6 +36,7 @@ extern CONST UINT32 _gPeimRevision; **/ EFI_STATUS EFIAPI +EFI_ENTRYPOINT _ModuleEntryPoint ( IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices diff --git a/MdePkg/Include/Library/UefiApplicationEntryPoint.h b/MdePkg/Include/Library/UefiApplicationEntryPoint.h index ec568ab6c5ad..9fe54aceceee 100644 --- a/MdePkg/Include/Library/UefiApplicationEntryPoint.h +++ b/MdePkg/Include/Library/UefiApplicationEntryPoint.h @@ -40,6 +40,7 @@ extern CONST UINT32 _gUefiDriverRevision; **/ EFI_STATUS EFIAPI +EFI_ENTRYPOINT _ModuleEntryPoint ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable diff --git a/MdePkg/Include/Library/UefiDriverEntryPoint.h b/MdePkg/Include/Library/UefiDriverEntryPoint.h index f9d9befb9c12..107b6e45bd6e 100644 --- a/MdePkg/Include/Library/UefiDriverEntryPoint.h +++ b/MdePkg/Include/Library/UefiDriverEntryPoint.h @@ -57,6 +57,7 @@ extern CONST UINT8 _gDriverUnloadImageCount; **/ EFI_STATUS EFIAPI +EFI_ENTRYPOINT _ModuleEntryPoint ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable diff --git a/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c b/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c index d3d8c4c47c51..ea71ab8d8eb6 100644 --- a/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c +++ b/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c @@ -39,6 +39,7 @@ VOID *gHobList = NULL; **/ VOID EFIAPI +EFI_ENTRYPOINT _ModuleEntryPoint ( IN VOID *HobStart ) diff --git a/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c b/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c index 5662ccff15f0..eef27651c35a 100644 --- a/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c +++ b/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c @@ -56,6 +56,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ VOID EFIAPI +EFI_ENTRYPOINT _ModuleEntryPoint( IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData, IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList diff --git a/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c b/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c index 83a1bd8ccc32..201445ed69a8 100644 --- a/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c +++ b/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c @@ -34,6 +34,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ EFI_STATUS EFIAPI +EFI_ENTRYPOINT _ModuleEntryPoint ( IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices diff --git a/MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c b/MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c index dc05b23fd823..a7cdbfa13d89 100644 --- a/MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c +++ b/MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c @@ -38,6 +38,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ EFI_STATUS EFIAPI +EFI_ENTRYPOINT _ModuleEntryPoint ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable diff --git a/MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c b/MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c index f5da5ac4ad10..a14874df2bea 100644 --- a/MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c +++ b/MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c @@ -92,6 +92,7 @@ _DriverUnloadHandler ( **/ EFI_STATUS EFIAPI +EFI_ENTRYPOINT _ModuleEntryPoint ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable