powerpc: Build-time sort the exception table
authorNicholas Piggin <npiggin@gmail.com>
Thu, 13 Oct 2016 05:42:55 +0000 (16:42 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 14 Nov 2016 00:11:51 +0000 (11:11 +1100)
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/Kconfig
arch/powerpc/include/asm/module.h
scripts/sortextable.c

index 65fba4c34cd75fd94e7565aeea211e223938c8fe..8567c68092405c593545b351b9189b4d2bcc6fd8 100644 (file)
@@ -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
index cd4ffd86765f35eeac01f0103307aa5ef174d0e5..cc12c61ef315fc6ca5d43233bd54889cd19a01a0 100644 (file)
@@ -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
index f453b7ce99d66a66ebd7d8981b6eeaa8269da442..365a907f98b3dac8653d1a6d3812fc2d7890ef29 100644 (file)
@@ -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: