From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756914Ab2DTAW2 (ORCPT ); Thu, 19 Apr 2012 20:22:28 -0400 Received: from terminus.zytor.com ([198.137.202.10]:52896 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753934Ab2DTAW0 (ORCPT ); Thu, 19 Apr 2012 20:22:26 -0400 Date: Thu, 19 Apr 2012 17:22:15 -0700 From: tip-bot for David Daney Message-ID: Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org, david.daney@cavium.com, tglx@linutronix.de, hpa@linux.intel.com Reply-To: mingo@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org, david.daney@cavium.com, tglx@linutronix.de, hpa@linux.intel.com In-Reply-To: <1334872799-14589-4-git-send-email-ddaney.cavm@gmail.com> References: <1334872799-14589-4-git-send-email-ddaney.cavm@gmail.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/extable] kbuild/extable: Hook up sortextable into the build system. Git-Commit-ID: 1dbdc6f177c627ae462752c80a5c7f3b06a7f92a X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (terminus.zytor.com [127.0.0.1]); Thu, 19 Apr 2012 17:22:21 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 1dbdc6f177c627ae462752c80a5c7f3b06a7f92a Gitweb: http://git.kernel.org/tip/1dbdc6f177c627ae462752c80a5c7f3b06a7f92a Author: David Daney AuthorDate: Thu, 19 Apr 2012 14:59:57 -0700 Committer: H. Peter Anvin CommitDate: Thu, 19 Apr 2012 15:06:56 -0700 kbuild/extable: Hook up sortextable into the build system. Define a config variable BUILDTIME_EXTABLE_SORT to control build time sorting of the kernel's exception table. Patch Makefile to do the sorting when BUILDTIME_EXTABLE_SORT is selected. Signed-off-by: David Daney Link: http://lkml.kernel.org/r/1334872799-14589-4-git-send-email-ddaney.cavm@gmail.com Signed-off-by: H. Peter Anvin --- Makefile | 10 ++++++++++ init/Kconfig | 3 +++ 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index f6578f4..622c918 100644 --- a/Makefile +++ b/Makefile @@ -784,6 +784,10 @@ quiet_cmd_vmlinux_version = GEN .version quiet_cmd_sysmap = SYSMAP cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap +# Sort exception table at build time +quiet_cmd_sortextable = SORTEX + cmd_sortextable = $(objtree)/scripts/sortextable + # Link of vmlinux # If CONFIG_KALLSYMS is set .version is already updated # Generate System.map and verify that the content is consistent @@ -796,6 +800,12 @@ define rule_vmlinux__ $(call cmd,vmlinux__) $(Q)echo 'cmd_$@ := $(cmd_vmlinux__)' > $(@D)/.$(@F).cmd + $(if $(CONFIG_BUILDTIME_EXTABLE_SORT), \ + $(Q)$(if $($(quiet)cmd_sortextable), \ + echo ' $($(quiet)cmd_sortextable) vmlinux' &&) \ + $(cmd_sortextable) vmlinux) + + $(Q)$(if $($(quiet)cmd_sysmap), \ echo ' $($(quiet)cmd_sysmap) System.map' &&) \ $(cmd_sysmap) $@ System.map; \ diff --git a/init/Kconfig b/init/Kconfig index 6cfd71d..92a1296 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -27,6 +27,9 @@ config IRQ_WORK bool depends on HAVE_IRQ_WORK +config BUILDTIME_EXTABLE_SORT + bool + menu "General setup" config EXPERIMENTAL