From patchwork Tue Jun 12 15:22:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 138361 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp5490585lji; Tue, 12 Jun 2018 08:23:31 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI+QrWg7JVJE0iu5dywoGYQI7QldRYsDmczMgUctfZXNZK5iPzU6aVQ5x8dZdrKG0kVVA/F X-Received: by 2002:a63:5fc1:: with SMTP id t184-v6mr743157pgb.132.1528817010990; Tue, 12 Jun 2018 08:23:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528817010; cv=none; d=google.com; s=arc-20160816; b=sTTvEylGdiPaX4HjScNxsPns6vOs1H+ax7jzlDPKa2tTW3SH9XzhbzEzZoxX/5OBLr wgF6nY744/jfpRb0DFp43z9pjD+LAqACviL/LyQvyjqZ0qTWbbY95OzCVsw40WDPa0P8 naEBPhyc5iunDtWHhqBuCZ7Ts8eDg9YBc4fRlqBX/68fZvH7dqQYAL6wlVCriE9a3Tbn mk4Xq9ROj7Q40KKPRdQb/unvd1E9YtM1watGRdQvtf59IsvvSi3WTNU/pRRnllQ0qrGa zN4GonFvYtPoDbzb/fZss8Yql8NKzsFt7DYTFqOb9EGZ0v+9bCl/B5sVkioVd8iN7zw/ KK9Q== 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=JIc2CUVgF8mu2Xqo76vNMnnFvAF2f6oy8o1ruErfW7Q=; b=FZLaDA68PODDtnt4xaNAdc0cOMLj65rdDYfjlxrNxBUiOV0jMUOwSWvzDc21qNw371 gvWNnOIPY1j7HNLKhdkONPH/bsRt4kK4I2lJ6IZuIedgDHN+7PGpDJZHvwd4C7ldvdTa fjP1Ilg1/XVpR33MdjTsO9Q5zPQvpGI57+nXy1C7NzOGCHD46/NaduY6pKSaoGoXVgGt vjNW8WY+4tKuGqc4tNmzib1mo/tPxfDxmTfiMzNqFvJviGAeEhoB7MwWpbDQK8cD20ew thhV7edJ+J4Hver2uEd7rQcA4+023DfXxRj+x47fSMh5XkDZUcPfzMmFG2YZiXhjD35o ywOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Q6hdJHyt; 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 b26-v6si352959pff.278.2018.06.12.08.23.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jun 2018 08:23:30 -0700 (PDT) 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=Q6hdJHyt; 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 962C621295B29; Tue, 12 Jun 2018 08:23:30 -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:c09::242; helo=mail-wm0-x242.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (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 0A7F321295B20 for ; Tue, 12 Jun 2018 08:23:27 -0700 (PDT) Received: by mail-wm0-x242.google.com with SMTP id j15-v6so24217472wme.0 for ; Tue, 12 Jun 2018 08:23:27 -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=LfLa8F4gsA3noW+oCZVDVbZS3fyISFGwd6SyXz5CxJs=; b=Q6hdJHytDWnObdJpmnSIZdrFav0LlvegpdXuHGearOrqjKXOWRq5OPh1pu4uhoKzzf OF7QBMqzxQTV6GY6ctZR5eU1NS97qxUXqqAnjEM8UMVqlvDNAlGZJcoRK45y6OpPremK yphnCw1cTRQphSUudnaKTMu2TIsVVnoeKGgmU= 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=LfLa8F4gsA3noW+oCZVDVbZS3fyISFGwd6SyXz5CxJs=; b=crmOa6qNz19ma5wuB5PYvLe0mzzRcuaG33HbBVfzuAVtVB1olm2ip7yyzOQYDU/JBz 6mVIxDAuHAzo0YtQ8gN+LnqwLNKSJ/touCK3KVxwVWRql34StBXYVfNvdbnPwBOf5Gjc JNlvS6+JWlN15YrMti4yXDXJeAwgXe2gzsXhFoZ/lTC6Q6lqqWGY4bvONF8mHTsd5RsG 5lB/I9VzI/1cr83dtx2+MWrdr9UEiGSc+cXMN1UjQ6uvnD1mSdO1fFAecCm//zBfe5PO XmtIScx7Ixn4M+euFpBJ78ysEn0In6BPGE9t1ZNhZiTtMoa/eFgEkVm6qwgUZxQ/XcBA 7WXw== X-Gm-Message-State: APt69E2uu1BgnqXPTdsBoL8iMhz6mFCemIpX0PghkbKTcDo7sCLZKgyI ad1Of35VOfkhMtqQL2pmqTx3RtPqrvI= X-Received: by 2002:a1c:f45:: with SMTP id 66-v6mr565986wmp.124.1528817006369; Tue, 12 Jun 2018 08:23:26 -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.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jun 2018 08:23:25 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Tue, 12 Jun 2018 17:22:56 +0200 Message-Id: <20180612152306.25998-2-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 01/11] MdePkg/ProcessorBind.h: define macro to decorate module entry points 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" Add a macro EFI_ENTRYPOINT that we will use to decorate functions that serve as the entry points for EFI modules. This is necessary to work around a limitation in GCC, which may prune such routines from the ELF binary if they are defined with hidden visibility, even if they are explicitly referenced as the entry point on the linker command line. The hidden visibility is required to inform the compiler that, even though we are building the code in PIE mode, we are only doing so to get code that can run anywhere in the address space without requiring 64-bit wide absolute symbol references, and we are not interested in other things that PIE code typically provides, such as symbol preemptability and a reduced CoW footprint due to the fact that all dynamic relocations target the same area in the binary. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- MdePkg/Include/Base.h | 7 +++++++ 1 file changed, 7 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/Base.h b/MdePkg/Include/Base.h index 4f7bd4449c36..eee48dcd4b29 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -274,6 +274,13 @@ VERIFY_SIZE_OF (__VERIFY_UINT32_ENUM_SIZE, 4); #define PACKED #endif +#ifndef EFI_ENTRYPOINT + // + // Set to empty value if not already set by the arch-specific header + // + #define EFI_ENTRYPOINT +#endif + /// /// 128 bit buffer containing a unique identifier value. /// Unless otherwise specified, aligned on a 64 bit boundary.