From patchwork Thu Oct 13 05:42:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 681611 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3svfxV2DtNz9rxv for ; Thu, 13 Oct 2016 16:51:42 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=FwYyAbHb; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3svfxV15lzzDt5N for ; Thu, 13 Oct 2016 16:51:42 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=FwYyAbHb; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pa0-x243.google.com (mail-pa0-x243.google.com [IPv6:2607:f8b0:400e:c03::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3svflt2gX4zDt1F for ; Thu, 13 Oct 2016 16:43:22 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=FwYyAbHb; dkim-atps=neutral Received: by mail-pa0-x243.google.com with SMTP id fn2so3380744pad.1 for ; Wed, 12 Oct 2016 22:43:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XKLJWXXWVrf4s+6DscaBDq9ER0CigQLf+2eYadw0HDM=; b=FwYyAbHb+FYtk0G064U+mYf/KdfbDXB742w+VFrekT4LdXyoCxR0GocvcpBKyMSQQa hvHno1VrKAoIHOgBpnAIBD5iCUQkqKKv7XeJOLn4Q2YOgf3/jRKUWto00JJvzB0WxpvA Wk+ooRI3OgX7COwjUt22lxZznmzJ//RG/XAgh4EAmJL09AxYK0/LI8zmlwGDYYe9s7uB XO/k0ns4NeTiM0NuEsxKbyQJljZbyXqdxOg5XD7ZZKiDG/1jCBT+SkTFDc+QmG9zOqt2 HwtbugrjblqYxW+SlUyrm5rbdsKKXB54DsLCtJkyfNkjCKruHcaK3iBuLCke+FM1k5tt /gpQ== 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=XKLJWXXWVrf4s+6DscaBDq9ER0CigQLf+2eYadw0HDM=; b=C5Dtx9JtWlE8esXgfkhIYDa9InsQJbadPp8Bo35W0815UPnLfNZuUfSx7Yaz2g5xOF Ef6s2X20OEdA6K+rBs6WRX3mnvfxpwDNQku+zUJJQV4o8nT3GaejznDBBpE7ZhmscoB4 x9NZeu2GpideCZYPpuLE6oEVV0UFBpy2LTrAcQXYW//HJl3u4k8yubl2zCKXpoxiUTuh tIUGTWESYRRxCzA4yxdlwIjAqo32fKvx/bPKV3muMj/8PYwmpL8s4fzxdkr5MVyBc13g wdKh49rVHbMeXRXEzssS4Isr9y0vnp0P40YleWbj6zp+ctDb/VH1FneHwNEGb0obCZ5H vHgw== X-Gm-Message-State: AA6/9RlKxXA+3dTYoOy4YX1FLE563y4arL2rqUPrX9FhmFPKFkAyVbBiFhOJJaqVbu8KAg== X-Received: by 10.66.83.98 with SMTP id p2mr6293516pay.54.1476337400648; Wed, 12 Oct 2016 22:43:20 -0700 (PDT) Received: from roar.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id m20sm15915589pfk.96.2016.10.12.22.43.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Oct 2016 22:43:20 -0700 (PDT) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH 3/3] powerpc: build-time sort exception table Date: Thu, 13 Oct 2016 16:42:55 +1100 Message-Id: <20161013054255.7205-4-npiggin@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161013054255.7205-1-npiggin@gmail.com> References: <20161013054255.7205-1-npiggin@gmail.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicholas Piggin Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Signed-off-by: Nicholas Piggin --- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/module.h | 4 ---- scripts/sortextable.c | 2 ++ 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 5d43cb8..b49062b 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -80,6 +80,7 @@ config ARCH_HAS_DMA_SET_COHERENT_MASK config PPC bool default y + select BUILDTIME_EXTABLE_SORT select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_MIGHT_HAVE_PC_SERIO select BINFMT_ELF diff --git a/arch/powerpc/include/asm/module.h b/arch/powerpc/include/asm/module.h index cd4ffd8..cc12c61 100644 --- a/arch/powerpc/include/asm/module.h +++ b/arch/powerpc/include/asm/module.h @@ -90,10 +90,6 @@ static inline int module_finalize_ftrace(struct module *mod, const Elf_Shdr *sec } #endif -struct exception_table_entry; -void sort_ex_table(struct exception_table_entry *start, - struct exception_table_entry *finish); - #if defined(CONFIG_MODVERSIONS) && defined(CONFIG_PPC64) #define ARCH_RELOCATES_KCRCTAB #define reloc_start PHYSICAL_START diff --git a/scripts/sortextable.c b/scripts/sortextable.c index f453b7c..365a907 100644 --- a/scripts/sortextable.c +++ b/scripts/sortextable.c @@ -316,6 +316,8 @@ do_file(char const *const fname) case EM_S390: case EM_AARCH64: case EM_PARISC: + case EM_PPC: + case EM_PPC64: custom_sort = sort_relative_table; break; case EM_ARCOMPACT: