From patchwork Thu May 18 09:09:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 100063 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp622854qge; Thu, 18 May 2017 02:10:07 -0700 (PDT) X-Received: by 10.84.236.67 with SMTP id h3mr3553984pln.86.1495098607255; Thu, 18 May 2017 02:10:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495098607; cv=none; d=google.com; s=arc-20160816; b=QQK+f5AYkVKBmMro65JLqw0eOAtvVqRtjZnNLSn+VxATrGProJxcroOrJbSlPNebbE iVPKUlup9tZQ8s2lV7OpzHhC1DBVj7eZMP2z/Ei6z/Eu5y/n9jOsbHFxIFZU8FRtNWuu c1pM0wRHM4ukhAJ+Jl8Z2QFVIGyFav2tVnnKZF4QJjJxzW//iR6aHyemBr9RLrYDY6rz /G+l8MVXeSUaLnGzuG6aITUieNh2nkV1q6v+a/NRGMwTihaQkY6UbCuXOwr3DfLK5Dto i1YnyeyCAtyraQkwvQiNq3RKi39kcpdg+tLQd8sVbcpL8BVpJHdGOhPazg8nDipqgey6 N6Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=r4B9pNXsJuixV6NTaOK0MFiAEK9C4cnkKRvaTD/x4pg=; b=LSnqnCygwjfycdUKRsxkSUkrfM3y8yhOVX5uBPwsRQ1VE3GkwvBVAvkin/p5i0bo9K fWoWA+QOdgEAdPKq2YNo3mioia4dUd8no4E46krPpuDsoCCN1WXauimxm1zADuWElAlU lWNdLfA2f5Mnzz97VNb5hPCdvx34QjF3oXxn0QBpFMCEkoXTRdqhMUeOlYYDDerQ/JOL lDSkTmjxhhB14fhW6mzVn5/YklGTP4TeA71Bns44jfKRTn/YoqCAtJUIk4teBoaGzXPh sfBJlUy5ys9O5BWHSukN++elZTUO1l7yfgYY2UJZTOEyjx62RFT++Yjdr0rbG6WhlmRN wj9w== 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.07; Thu, 18 May 2017 02:10:07 -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 S1755074AbdERJKG (ORCPT + 2 others); Thu, 18 May 2017 05:10:06 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:36607 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751486AbdERJKF (ORCPT ); Thu, 18 May 2017 05:10:05 -0400 Received: by mail-wm0-f44.google.com with SMTP id 70so38932617wmq.1 for ; Thu, 18 May 2017 02:10:05 -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=k9jYkXf6ezg+TdKcRTvcryICF4TrYc0Wo/3UF5p2Ei4=; b=FGCpS3yuEzl19AlGHqk94fTH/6NLZQjSKG1R5NKiKNRUYRZPCJjjLhZPvUrvSkxG1w KhtluanWxd+ZmU6268gogv8PRRXHttl0CYFtR4TjXgMEHAXeB6Er2zj4fb60AnM+uL74 f9qVmDmTY/h0I3hYBhTbyjyUZxpMOqr4HCNCo= 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=k9jYkXf6ezg+TdKcRTvcryICF4TrYc0Wo/3UF5p2Ei4=; b=XxlS7qObos7FJtMVS1N5hEP2vuDP791rakBNuJtIf/FjANizV9VxPMWhLJywOrlC8i 9fF8bHtXs9KCwe8LPdoeK4C/9Zh/HrZz0eYnSJFUWMadBajrAwBP0je6u1WONIVEi5ek 80x+CH5NkR2gbtU5RaBGF9/K2ff0htENtvWaXQTPwEjNKWsLFvbFcK7X3M+7ap8RImcq qDqYb6UZcAnEbVvpkHRV3YY2k7BmkUOypYXlpOHgtlRLNLU0c2TV+5rl3m0h/zpCp8mZ 6/Db3EMu6yGcUC61NzxNH6aQnD+AkyS3iEP7E7PXXJCbzYzwAzLXPg4KtZpa3dkiKYsz 68vQ== X-Gm-Message-State: AODbwcDPOBGqxAPJVaREdxGIg5ceOzMv6RT3lkWnP/DLOteOpGigl2VP 5OSWvruSd9eQWbYJ X-Received: by 10.80.146.51 with SMTP id i48mr2466157eda.48.1495098604457; Thu, 18 May 2017 02:10:04 -0700 (PDT) Received: from localhost.localdomain ([105.129.238.81]) by smtp.gmail.com with ESMTPSA id t17sm1406355edh.1.2017.05.18.02.10.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 May 2017 02:10:03 -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 1/3] efi/libstub: arm64: use hidden attribute for struct screen_info reference Date: Thu, 18 May 2017 10:09:51 +0100 Message-Id: <20170518090953.32628-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170518090953.32628-1-ard.biesheuvel@linaro.org> References: <20170518090953.32628-1-ard.biesheuvel@linaro.org> Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org To prevent the compiler from emitting absolute references to screen_info when building position independent code, redeclare the symbol with hidden visibility. Signed-off-by: Ard Biesheuvel --- arch/arm64/include/asm/efi.h | 3 +++ 1 file changed, 3 insertions(+) -- 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 Tested-by: Matthias Kaehlcke diff --git a/arch/arm64/include/asm/efi.h b/arch/arm64/include/asm/efi.h index 8f3043aba873..464ac850c5e2 100644 --- a/arch/arm64/include/asm/efi.h +++ b/arch/arm64/include/asm/efi.h @@ -81,6 +81,9 @@ static inline unsigned long efi_get_max_initrd_addr(unsigned long dram_base, #define alloc_screen_info(x...) &screen_info #define free_screen_info(x...) +/* redeclare as 'hidden' so the compiler will generate relative references */ +extern struct screen_info screen_info __attribute__((__visibility__("hidden"))); + static inline void efifb_setup_from_dmi(struct screen_info *si, const char *opt) { }