From patchwork Thu May 18 09:09:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 100062 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp622844qge; Thu, 18 May 2017 02:10:05 -0700 (PDT) X-Received: by 10.99.2.78 with SMTP id 75mr3238658pgc.157.1495098605088; Thu, 18 May 2017 02:10:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495098605; cv=none; d=google.com; s=arc-20160816; b=iKpqhz6x1cZwiqKXxPcDScy1uTcyDwGg09+rJx9WU4svD6quIzqIEBEvQy1UM4qSB/ A+iELmSaNSAe49vk88r6HDyaB5EBcaIw0joVzpNtmh4cAka5dFPMn6vMRyREVYCo7R81 CJFY6xHZ8o5FB0Nv2oriWf34BaYO4NkG4B41Xy6bfCTt5o5e1YAGlKdna0xnOD9I7Rv9 WgfntLP1CTl5S5KZ3mBOw2Af5fd/XlymIVmfXtpylruHQaohEJ29oFMGQC3LUnUDG7Io cD7sYnPzPZ5fK4VoWhXe5z/Wy/aVYQzkeQ/nBwL2G0hgU2pDhqjjKUUr4cCwqAeLH84n aM9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=hMWNzUjwzvAKb3b1cbPSVJnozTfnX2sPR2mmJ+Jw118=; b=xYZEu5qDlXbu7uU1g9uKkRTv6awX+D1rTtpobu39lm4W3622xyLLBdlyffWF5AtTl4 C958OlrQ81sPB1va+atUJc9IzMrr9lAM90MQDQorxAojXm110d0P34bSMOkdEL1bi6ow auch0o0+d88BRUSu3Wdjcf2p6P4O+j6QAPWSwSfEkOlcTrW/sSgXqn1s+sfc2fGJ8Rea s2j13//SCjm28qO2s/rsCiJPPMu70kFsAuY8ms3c3OZ+k6y/mqElbktf9eFb1dmQQt88 uLylTXthsjNvauo/rr9RuWVN2bMWXavQcGwnmN++clze6SZFVbCKXuCcoy2OORHq3fob KyGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1si4627265pge.155.2017.05.18.02.10.04; Thu, 18 May 2017 02:10:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754325AbdERJKE (ORCPT + 2 others); Thu, 18 May 2017 05:10:04 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:33642 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751486AbdERJKD (ORCPT ); Thu, 18 May 2017 05:10:03 -0400 Received: by mail-wm0-f53.google.com with SMTP id v15so10057099wmv.0 for ; Thu, 18 May 2017 02:10:02 -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; bh=KTV81lvZy8sFmOiCaNGL2mKQAC6vWouLSWiXTax8nnI=; b=bJ9HYb1ci/Fu3acxZOUXjGkClZTJiTwR1eKYuuul/xWSK5FgxYbXjrl2B+74mDooNm XDJRvmmus2vaNj0tlO84uRHNr+8wtmaHViYcNXjyDpdVNuRnlktTgX/LbzETjNcRmhV1 ThEI6uoxtzfTOvmmg7ERJaxtWjq8imL12c170= 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; bh=KTV81lvZy8sFmOiCaNGL2mKQAC6vWouLSWiXTax8nnI=; b=SuQmtbN32qjW/sKRaM2NBRRGwQ+61wyVyh9jqqXukmxp/+IC3fGEQMtcWLBYaivk/T 0UERsj4MnBiasRIyeQrfFt7k/7cLFLZBAXNJsAmpx1yu/ElZNAyBGJMQ7YCRt1xZbGEj u6CG4hBzOGAVh0FzjKKYGul2lFKlGTlT2F1hedWGBSTI/1uVhNAC/T8YN96cGAbFRGv0 FXezxULm5UN8SRU94syAs0xbyOFGHoFRLNRJJDs3n6YWiH9XCPJiPPhVKN29cA2z5ZTz LqWN7VSMiMyth/VLemKShp9HfLi9l+XBHksxp13KwrxDNPi+musW4qJSPcjo80B1osRY DwpQ== X-Gm-Message-State: AODbwcB73M5mkDsCGczUdMyiHfeHsO9/jC2EnvNMrXWkeYPjGWYMAO7s QR1gckEkFBWCMQTz X-Received: by 10.80.168.165 with SMTP id k34mr2361804edc.165.1495098602133; Thu, 18 May 2017 02:10:02 -0700 (PDT) Received: from localhost.localdomain ([105.129.238.81]) by smtp.gmail.com with ESMTPSA id t17sm1406355edh.1.2017.05.18.02.09.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 May 2017 02:10:01 -0700 (PDT) From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: mark.rutland@arm.com, ghackmann@google.com, matt@codeblueprint.co.uk, mka@chromium.org, Bernhard.Rosenkranzer@linaro.org, grundler@chromium.org, md@google.com, linux-arm-kernel@lists.infradead.org, Ard Biesheuvel Subject: [PATCH 0/3] efi: arm64: use -fpie for building the stub Date: Thu, 18 May 2017 10:09:50 +0100 Message-Id: <20170518090953.32628-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org Clang requires the stub to be built with -fpie, or it may emit absolute symbol references that trigger the absolute relocation detection code and cause the build to fail. The remedy is to set -fpie (#3), but due to stupid ELF symbol preemption rules that only apply to shared libraries, this will result in more rather than fewer absolute references (i.e., GOT entries), which we have to massage away using visibility overrides first. (#1, #2) Ard Biesheuvel (3): efi/libstub: arm64: use hidden attribute for struct screen_info reference efi/libstub: arm64: force 'hidden' visibility for section markers efi/libstub: arm64: set -fpie when building the EFI stub arch/arm64/include/asm/efi.h | 3 +++ drivers/firmware/efi/libstub/Makefile | 2 +- drivers/firmware/efi/libstub/arm64-stub.c | 10 +++++++++- 3 files changed, 13 insertions(+), 2 deletions(-) -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-efi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html