提交 b0b806ee 编写于 作者: S Shile Zhang

scripts/sorttable: Rename 'sortextable' to 'sorttable'

commit 1091670637be8bd34a39dd1ddcc0a10a7c88d4e2 upstream.

Use a more generic name for additional table sorting usecases,
such as the upcoming ORC table sorting feature. This tool is
not tied to exception table sorting anymore.

No functional changes intended.

[ mingo: Rewrote the changelog. ]
Signed-off-by: NShile Zhang <shile.zhang@linux.alibaba.com>
Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: linux-kbuild@vger.kernel.org
Link: https://lkml.kernel.org/r/20191204004633.88660-6-shile.zhang@linux.alibaba.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
Acked-by: NCaspar Zhang <caspar@linux.alibaba.com>
上级 007f52e4
...@@ -14,7 +14,7 @@ config ARC ...@@ -14,7 +14,7 @@ config ARC
select ARCH_HAS_SYNC_DMA_FOR_DEVICE select ARCH_HAS_SYNC_DMA_FOR_DEVICE
select ARCH_HAS_SG_CHAIN select ARCH_HAS_SG_CHAIN
select ARCH_SUPPORTS_ATOMIC_RMW if ARC_HAS_LLSC select ARCH_SUPPORTS_ATOMIC_RMW if ARC_HAS_LLSC
select BUILDTIME_EXTABLE_SORT select BUILDTIME_TABLE_SORT
select CLONE_BACKWARDS select CLONE_BACKWARDS
select COMMON_CLK select COMMON_CLK
select DMA_NONCOHERENT_OPS select DMA_NONCOHERENT_OPS
......
...@@ -25,7 +25,7 @@ config ARM ...@@ -25,7 +25,7 @@ config ARM
select ARCH_USE_BUILTIN_BSWAP select ARCH_USE_BUILTIN_BSWAP
select ARCH_USE_CMPXCHG_LOCKREF select ARCH_USE_CMPXCHG_LOCKREF
select ARCH_WANT_IPC_PARSE_VERSION select ARCH_WANT_IPC_PARSE_VERSION
select BUILDTIME_EXTABLE_SORT if MMU select BUILDTIME_TABLE_SORT if MMU
select CLONE_BACKWARDS select CLONE_BACKWARDS
select CPU_PM if (SUSPEND || CPU_IDLE) select CPU_PM if (SUSPEND || CPU_IDLE)
select DCACHE_WORD_ACCESS if HAVE_EFFICIENT_UNALIGNED_ACCESS select DCACHE_WORD_ACCESS if HAVE_EFFICIENT_UNALIGNED_ACCESS
......
...@@ -71,7 +71,7 @@ config ARM64 ...@@ -71,7 +71,7 @@ config ARM64
select ARM_GIC_V3 select ARM_GIC_V3
select ARM_GIC_V3_ITS if PCI select ARM_GIC_V3_ITS if PCI
select ARM_PSCI_FW select ARM_PSCI_FW
select BUILDTIME_EXTABLE_SORT select BUILDTIME_TABLE_SORT
select CLONE_BACKWARDS select CLONE_BACKWARDS
select COMMON_CLK select COMMON_CLK
select CPU_PM if (SUSPEND || CPU_IDLE) select CPU_PM if (SUSPEND || CPU_IDLE)
......
...@@ -7,7 +7,7 @@ config MICROBLAZE ...@@ -7,7 +7,7 @@ config MICROBLAZE
select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_MIGHT_HAVE_PC_PARPORT
select ARCH_NO_COHERENT_DMA_MMAP if !MMU select ARCH_NO_COHERENT_DMA_MMAP if !MMU
select ARCH_WANT_IPC_PARSE_VERSION select ARCH_WANT_IPC_PARSE_VERSION
select BUILDTIME_EXTABLE_SORT select BUILDTIME_TABLE_SORT
select TIMER_OF select TIMER_OF
select CLONE_BACKWARDS3 select CLONE_BACKWARDS3
select COMMON_CLK select COMMON_CLK
......
...@@ -13,7 +13,7 @@ config MIPS ...@@ -13,7 +13,7 @@ config MIPS
select ARCH_USE_QUEUED_RWLOCKS select ARCH_USE_QUEUED_RWLOCKS
select ARCH_USE_QUEUED_SPINLOCKS select ARCH_USE_QUEUED_SPINLOCKS
select ARCH_WANT_IPC_PARSE_VERSION select ARCH_WANT_IPC_PARSE_VERSION
select BUILDTIME_EXTABLE_SORT select BUILDTIME_TABLE_SORT
select CLONE_BACKWARDS select CLONE_BACKWARDS
select CPU_PM if CPU_IDLE select CPU_PM if CPU_IDLE
select DMA_DIRECT_OPS select DMA_DIRECT_OPS
......
...@@ -18,7 +18,7 @@ config PARISC ...@@ -18,7 +18,7 @@ config PARISC
select HAVE_MEMBLOCK select HAVE_MEMBLOCK
select NO_BOOTMEM select NO_BOOTMEM
select BUG select BUG
select BUILDTIME_EXTABLE_SORT select BUILDTIME_TABLE_SORT
select HAVE_PERF_EVENTS select HAVE_PERF_EVENTS
select HAVE_KERNEL_BZIP2 select HAVE_KERNEL_BZIP2
select HAVE_KERNEL_GZIP select HAVE_KERNEL_GZIP
......
...@@ -154,7 +154,7 @@ config PPC ...@@ -154,7 +154,7 @@ config PPC
select ARCH_WANT_IPC_PARSE_VERSION select ARCH_WANT_IPC_PARSE_VERSION
select ARCH_WEAK_RELEASE_ACQUIRE select ARCH_WEAK_RELEASE_ACQUIRE
select BINFMT_ELF select BINFMT_ELF
select BUILDTIME_EXTABLE_SORT select BUILDTIME_TABLE_SORT
select CLONE_BACKWARDS select CLONE_BACKWARDS
select DCACHE_WORD_ACCESS if PPC64 && CPU_LITTLE_ENDIAN select DCACHE_WORD_ACCESS if PPC64 && CPU_LITTLE_ENDIAN
select DYNAMIC_FTRACE if FUNCTION_TRACER select DYNAMIC_FTRACE if FUNCTION_TRACER
......
...@@ -107,7 +107,7 @@ config S390 ...@@ -107,7 +107,7 @@ config S390
select ARCH_USE_CMPXCHG_LOCKREF select ARCH_USE_CMPXCHG_LOCKREF
select ARCH_WANTS_DYNAMIC_TASK_STRUCT select ARCH_WANTS_DYNAMIC_TASK_STRUCT
select ARCH_WANT_IPC_PARSE_VERSION select ARCH_WANT_IPC_PARSE_VERSION
select BUILDTIME_EXTABLE_SORT select BUILDTIME_TABLE_SORT
select CLONE_BACKWARDS2 select CLONE_BACKWARDS2
select DYNAMIC_FTRACE if FUNCTION_TRACER select DYNAMIC_FTRACE if FUNCTION_TRACER
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
......
...@@ -84,7 +84,7 @@ config X86 ...@@ -84,7 +84,7 @@ config X86
select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
select ARCH_WANTS_DYNAMIC_TASK_STRUCT select ARCH_WANTS_DYNAMIC_TASK_STRUCT
select ARCH_WANTS_THP_SWAP if X86_64 select ARCH_WANTS_THP_SWAP if X86_64
select BUILDTIME_EXTABLE_SORT select BUILDTIME_TABLE_SORT
select CLKEVT_I8253 select CLKEVT_I8253
select CLOCKSOURCE_VALIDATE_LAST_CYCLE select CLOCKSOURCE_VALIDATE_LAST_CYCLE
select DCACHE_WORD_ACCESS select DCACHE_WORD_ACCESS
......
...@@ -10,7 +10,7 @@ config XTENSA ...@@ -10,7 +10,7 @@ config XTENSA
select ARCH_NO_COHERENT_DMA_MMAP if !MMU select ARCH_NO_COHERENT_DMA_MMAP if !MMU
select ARCH_WANT_FRAME_POINTERS select ARCH_WANT_FRAME_POINTERS
select ARCH_WANT_IPC_PARSE_VERSION select ARCH_WANT_IPC_PARSE_VERSION
select BUILDTIME_EXTABLE_SORT select BUILDTIME_TABLE_SORT
select CLONE_BACKWARDS select CLONE_BACKWARDS
select COMMON_CLK select COMMON_CLK
select DMA_NONCOHERENT_OPS select DMA_NONCOHERENT_OPS
......
...@@ -33,7 +33,7 @@ config CONSTRUCTORS ...@@ -33,7 +33,7 @@ config CONSTRUCTORS
config IRQ_WORK config IRQ_WORK
bool bool
config BUILDTIME_EXTABLE_SORT config BUILDTIME_TABLE_SORT
bool bool
config THREAD_INFO_IN_TASK config THREAD_INFO_IN_TASK
......
...@@ -9,7 +9,7 @@ unifdef ...@@ -9,7 +9,7 @@ unifdef
ihex2fw ihex2fw
recordmcount recordmcount
check-lc_ctype check-lc_ctype
sortextable sorttable
asn1_compiler asn1_compiler
extract-cert extract-cert
sign-file sign-file
......
...@@ -15,13 +15,13 @@ hostprogs-$(CONFIG_KALLSYMS) += kallsyms ...@@ -15,13 +15,13 @@ hostprogs-$(CONFIG_KALLSYMS) += kallsyms
hostprogs-$(CONFIG_LOGO) += pnmtologo hostprogs-$(CONFIG_LOGO) += pnmtologo
hostprogs-$(CONFIG_VT) += conmakehash hostprogs-$(CONFIG_VT) += conmakehash
hostprogs-$(BUILD_C_RECORDMCOUNT) += recordmcount hostprogs-$(BUILD_C_RECORDMCOUNT) += recordmcount
hostprogs-$(CONFIG_BUILDTIME_EXTABLE_SORT) += sortextable hostprogs-$(CONFIG_BUILDTIME_TABLE_SORT) += sorttable
hostprogs-$(CONFIG_ASN1) += asn1_compiler hostprogs-$(CONFIG_ASN1) += asn1_compiler
hostprogs-$(CONFIG_MODULE_SIG) += sign-file hostprogs-$(CONFIG_MODULE_SIG) += sign-file
hostprogs-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += extract-cert hostprogs-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += extract-cert
hostprogs-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert hostprogs-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
HOSTCFLAGS_sortextable.o = -I$(srctree)/tools/include HOSTCFLAGS_sorttable.o = -I$(srctree)/tools/include
HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include
HOSTLDLIBS_sign-file = -lcrypto HOSTLDLIBS_sign-file = -lcrypto
HOSTLDLIBS_extract-cert = -lcrypto HOSTLDLIBS_extract-cert = -lcrypto
......
...@@ -149,9 +149,9 @@ mksysmap() ...@@ -149,9 +149,9 @@ mksysmap()
${CONFIG_SHELL} "${srctree}/scripts/mksysmap" ${1} ${2} ${CONFIG_SHELL} "${srctree}/scripts/mksysmap" ${1} ${2}
} }
sortextable() sorttable()
{ {
${objtree}/scripts/sortextable ${1} ${objtree}/scripts/sorttable ${1}
} }
# Delete output files in case of error # Delete output files in case of error
...@@ -281,9 +281,9 @@ fi ...@@ -281,9 +281,9 @@ fi
info LD vmlinux info LD vmlinux
vmlinux_link "${kallsymso}" vmlinux vmlinux_link "${kallsymso}" vmlinux
if [ -n "${CONFIG_BUILDTIME_EXTABLE_SORT}" ]; then if [ -n "${CONFIG_BUILDTIME_TABLE_SORT}" ]; then
info SORTEX vmlinux info SORTTAB vmlinux
sortextable vmlinux sorttable vmlinux
fi fi
info SYSMAP System.map info SYSMAP System.map
......
/* /*
* sortextable.c: Sort the kernel's exception table * sorttable.c: Sort the kernel's table
* *
* Copyright 2011 - 2012 Cavium, Inc. * Copyright 2011 - 2012 Cavium, Inc.
* *
...@@ -182,9 +182,9 @@ static inline unsigned int get_secindex(unsigned int shndx, ...@@ -182,9 +182,9 @@ static inline unsigned int get_secindex(unsigned int shndx,
} }
/* 32 bit and 64 bit are very similar */ /* 32 bit and 64 bit are very similar */
#include "sortextable.h" #include "sorttable.h"
#define SORTEXTABLE_64 #define SORTTABLE_64
#include "sortextable.h" #include "sorttable.h"
static int compare_relative_table(const void *a, const void *b) static int compare_relative_table(const void *a, const void *b)
{ {
...@@ -351,7 +351,7 @@ int main(int argc, char *argv[]) ...@@ -351,7 +351,7 @@ int main(int argc, char *argv[])
void *addr = NULL; void *addr = NULL;
if (argc < 2) { if (argc < 2) {
fprintf(stderr, "usage: sortextable vmlinux...\n"); fprintf(stderr, "usage: sorttable vmlinux...\n");
return 0; return 0;
} }
......
/* /*
* sortextable.h * sorttable.h
* *
* Copyright 2011 - 2012 Cavium, Inc. * Copyright 2011 - 2012 Cavium, Inc.
* *
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#undef _r #undef _r
#undef _w #undef _w
#ifdef SORTEXTABLE_64 #ifdef SORTTABLE_64
# define extable_ent_size 16 # define extable_ent_size 16
# define compare_extable compare_extable_64 # define compare_extable compare_extable_64
# define do_sort do_sort_64 # define do_sort do_sort_64
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册