From patchwork Fri Aug 18 19:49:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 110432 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp1343648qge; Fri, 18 Aug 2017 12:50:16 -0700 (PDT) X-Received: by 10.84.198.129 with SMTP id p1mr10756498pld.120.1503085816274; Fri, 18 Aug 2017 12:50:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503085816; cv=none; d=google.com; s=arc-20160816; b=R/DhZLkMi9+cV6Q9rE8u4EDKRJJ7zamw1EDoTzpJs3cSEc1J3FteX7x4VuylqivLV7 o79ydP1xy0Jls0VrVEC+2PpuHvLcpSJ8acs9JeNfgZDer0k/WZZkw+/OZwEZBVWLKhqU 9EYlPmqll6hDnJMsEHZFMcwahvEkUuhjfWExD3ufi+RnlY771o0gT//jxLsRZYrOkgL3 W40xt8guk0Pv/l6aY4P1OUWEoMb0ombMKi4c48xssld/up08PkrzybIQsPQNDV+UzzPz UCuC3kBjerIiC29YQFfv6YhwXb4BrbHID6qAhhKgWa+Tgneer8G+kuknhj32PiG9Nslh 1d0Q== 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=Z0+SLxi1kGjJPoVkBM6KHhp6X1FtnIZAZfQZp/xRwyE=; b=ReMLrPcwZeubhFliir270W3/aV3mzkmf61lO97kWuksFBHgQstnhqiapgt1bHXEKvP BIAqxr25nVgtvPNavnOFApZr5T9Kte7/qf0AZTwk+q7EH2Iphue0sralwNC6WTGtCz2k e3a+Ucr/T+TPU7/ES0U6WClB/R180ioyVxjZzuPAh/z0/ozRc7qxe+qVnPxLP98SWiaA p/mtBGzbznXxcqg2qVCxH7he7OarZY22flyr8rEI4ACaMkEdJTNZKJu1X+5cKzMMgY+a P+zIZFERl5ddEPZH1vhlSwWRGOLL5UGaTihXyjE1Q8dOZ6QgjVi7fauuCwyV60UyR5Pu Vm3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QSWkDge1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (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 83si4009025pga.778.2017.08.18.12.50.15; Fri, 18 Aug 2017 12:50:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QSWkDge1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752311AbdHRTuK (ORCPT + 26 others); Fri, 18 Aug 2017 15:50:10 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:35330 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751852AbdHRTuF (ORCPT ); Fri, 18 Aug 2017 15:50:05 -0400 Received: by mail-wm0-f49.google.com with SMTP id m85so7245960wma.0 for ; Fri, 18 Aug 2017 12:50:04 -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=Z0+SLxi1kGjJPoVkBM6KHhp6X1FtnIZAZfQZp/xRwyE=; b=QSWkDge1DP9SpTIHo66eW4NvznV4gTvfmUQB/LybpGiYu13jrTwo9d2OF0U2uPjFeA k8EjJiHggPunRY6umNwmRQM7VCsIqJtszTDk7Ii91a9Rg67tZU3PLydLxH8bMmGT2I0J v3P1EtsfllV8WpaT4RE2oWQDOAROLpW5g9Z1Y= 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=Z0+SLxi1kGjJPoVkBM6KHhp6X1FtnIZAZfQZp/xRwyE=; b=QEABsFY0ce4bYUMaNmb34UDgYP9towmfA1D+2/sFO+pU06SxOV2IDFRqUBCWvvL4MD dgK1X3yKJs1FGa+tpQrKJJNNJsHrwk48RAl2ForcWlhdodqA/8QBk196hCnM3yvm5Hr3 o/JNLNgtWYYiGAIlC2qGy2Ye3KPx5u7S6cBVsKKo4czoxNnY3Z9OlwbY3S0wEcWF27L3 V5c34/z5TFE6/EUIB5K827+o0hisg3nopU7rwJGnKONDkEFzpaMgU0w4aVT0y7mVHe6N LJ7w+FkBxHM3/KF4ZPYa3t0yqJjvRt3D69tgXWIK1FER3L2cJIdq7lXD5+1QMB/OjuXj ykjA== X-Gm-Message-State: AHYfb5iq27+1ohW4Vs5/ylxAHRkqI/EGW0o1G9HR2yGWkTHYXDqzmRUM APzX8zwR6cZ0alru X-Received: by 10.28.92.14 with SMTP id q14mr1986728wmb.144.1503085803949; Fri, 18 Aug 2017 12:50:03 -0700 (PDT) Received: from localhost.localdomain ([154.146.161.128]) by smtp.gmail.com with ESMTPSA id k29sm5571168wrk.56.2017.08.18.12.50.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Aug 2017 12:50:03 -0700 (PDT) From: Ard Biesheuvel To: linux-efi@vger.kernel.org, Ingo Molnar , Thomas Gleixner , "H . Peter Anvin" Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, Matt Fleming Subject: [PATCH 02/14] efi/libstub: arm64: use hidden attribute for struct screen_info reference Date: Fri, 18 Aug 2017 20:49:35 +0100 Message-Id: <20170818194947.19347-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170818194947.19347-1-ard.biesheuvel@linaro.org> References: <20170818194947.19347-1-ard.biesheuvel@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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. Cc: Matt Fleming Tested-by: Matthias Kaehlcke Signed-off-by: Ard Biesheuvel --- arch/arm64/include/asm/efi.h | 3 +++ 1 file changed, 3 insertions(+) -- 2.11.0 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) { }