From patchwork Mon Jan 25 14:19:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 60367 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1385657lbb; Mon, 25 Jan 2016 06:20:50 -0800 (PST) X-Received: by 10.98.89.139 with SMTP id k11mr26443943pfj.82.1453731650571; Mon, 25 Jan 2016 06:20:50 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t74si34032959pfa.106.2016.01.25.06.20.50; Mon, 25 Jan 2016 06:20:50 -0800 (PST) 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; 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; dkim=pass header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757155AbcAYOUs (ORCPT + 30 others); Mon, 25 Jan 2016 09:20:48 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:33000 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756158AbcAYOTu (ORCPT ); Mon, 25 Jan 2016 09:19:50 -0500 Received: by mail-wm0-f42.google.com with SMTP id 123so67472056wmz.0 for ; Mon, 25 Jan 2016 06:19:50 -0800 (PST) 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=KdNMfb/IFITR7n0/urLJF7y38dv3Z3TAYMMafQppAjg=; b=SeMRF6x1nrL2RgUH9MF/UL69hTKRUFGhY/8jmUughk90JrOAzV+vYxJWee8xDRjfwb 6IkxwGuBRSIG+1HSyqGuFVvqpbytXpLzxfcUwz2lL0vqdAtWbTDKmA8ugG9AHGT4yNqS gcoSkQxXoTopH/KfIPTxnJFk0aCjMesV87qsg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KdNMfb/IFITR7n0/urLJF7y38dv3Z3TAYMMafQppAjg=; b=YVE5evYA8eGigGxQlRMDOSAZmO1yNTku1jp4DLwl6EkvDjkO2YEG5JuDU9MEMKsfdR VRu06g/9Px5guw2lSv3VNQX/HJ8PSQSCnWJqSVon6x2z1yvJP2xGyJEsrlCFQgWaM7bf gYTtc+5AxtSaq/Z8+SvIYLREWMfvJBAUBdUS9jRJzwKQ3yLIxOB7xOlesDd+fsy8h7xe Zab4e1JAh4Yu3Has8WQ5mJ6uy6ve0VHJK8Xedp1KeriuXL07i0SRSv9Bza41YGL2mMa9 adyYRiybCvsv2l7oeKWrGXzbkVRzARZwD5kPGD8ZxFNrJwDZHrT5fVjQKF53vMNcidmi UcAQ== X-Gm-Message-State: AG10YOSEgYe0zdA8hg8nwLERf0p2l6gkodmji1KOC+Hj+Qdh8HrbgLJJFtNYtBpOpcB8Manr X-Received: by 10.28.99.69 with SMTP id x66mr19066320wmb.10.1453731589731; Mon, 25 Jan 2016 06:19:49 -0800 (PST) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id c15sm16425805wmd.19.2016.01.25.06.19.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 Jan 2016 06:19:49 -0800 (PST) From: Ard Biesheuvel To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org, keescook@chromium.org, akpm@linux-foundation.org, mingo@kernel.org, hpa@zytor.com, heiko.carstens@de.ibm.com, benh@kernel.crashing.org, mpe@ellerman.id.au, mmarek@suse.cz, rusty@rustcorp.com.au, arnd@arndb.de, linux-arch@vger.kernel.org, linux@roeck-us.net Cc: Ard Biesheuvel Subject: [PATCH v4 1/3] x86: kallsyms: disable absolute percpu symbols on !SMP Date: Mon, 25 Jan 2016 15:19:30 +0100 Message-Id: <1453731572-18448-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1453731572-18448-1-git-send-email-ard.biesheuvel@linaro.org> References: <1453731572-18448-1-git-send-email-ard.biesheuvel@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org scripts/kallsyms.c has a special --absolute-percpu command line option which deals with the zero based per cpu offsets that are used when building for SMP on x86_64. This means that the option should only be passed in that case, so add a check for CONFIG_SMP. Otherwise, per cpu variables are recorded as absolute quantities, (which they are not under !CONFIG_SMP) and they are not relocated under CONFIG_RELOCATABLE=y. Signed-off-by: Ard Biesheuvel --- scripts/link-vmlinux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.5.0 diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index ba6c34ea5429..b541c21072f2 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -86,7 +86,7 @@ kallsyms() kallsymopt="${kallsymopt} --page-offset=$CONFIG_PAGE_OFFSET" fi - if [ -n "${CONFIG_X86_64}" ]; then + if [ -n "${CONFIG_X86_64}" ] && [ -n "${CONFIG_SMP}" ]; then kallsymopt="${kallsymopt} --absolute-percpu" fi