aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2014-01-23 18:52:46 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-23 19:36:50 -0500
commit372c7209d6a05130b9d867f7ba350dec19e54030 (patch)
tree848b56c51beca155be6bfa6c2908aa686bfc25a7
parent3fdb38bd1f43eddf4483160544d267a1e4d40e62 (diff)
microblaze: extable: sort the exception table at build time
Sort the exception table at build-time rather than during boot. Microblaze is the same case as AARCH64 that's why EM_MICROBLAZE conditional check was added to allow cross-compilation on machines which are not running the latest libc-dev. Inspired by AARCH64 commit adace89562c7 ("arm64: extable: sort the exception table at build time"). Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: David Daney <david.daney@cavium.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/microblaze/Kconfig1
-rw-r--r--scripts/sortextable.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index e23cccde9c27..8d581ab06c5d 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -30,6 +30,7 @@ config MICROBLAZE
30 select MODULES_USE_ELF_RELA 30 select MODULES_USE_ELF_RELA
31 select CLONE_BACKWARDS3 31 select CLONE_BACKWARDS3
32 select CLKSRC_OF 32 select CLKSRC_OF
33 select BUILDTIME_EXTABLE_SORT
33 34
34config SWAP 35config SWAP
35 def_bool n 36 def_bool n
diff --git a/scripts/sortextable.c b/scripts/sortextable.c
index 7941fbdfb050..cc49062acdee 100644
--- a/scripts/sortextable.c
+++ b/scripts/sortextable.c
@@ -39,6 +39,10 @@
39#define EM_AARCH64 183 39#define EM_AARCH64 183
40#endif 40#endif
41 41
42#ifndef EM_MICROBLAZE
43#define EM_MICROBLAZE 189
44#endif
45
42static int fd_map; /* File descriptor for file being modified. */ 46static int fd_map; /* File descriptor for file being modified. */
43static int mmap_failed; /* Boolean flag. */ 47static int mmap_failed; /* Boolean flag. */
44static void *ehdr_curr; /* current ElfXX_Ehdr * for resource cleanup */ 48static void *ehdr_curr; /* current ElfXX_Ehdr * for resource cleanup */
@@ -275,6 +279,7 @@ do_file(char const *const fname)
275 case EM_ARCOMPACT: 279 case EM_ARCOMPACT:
276 case EM_ARM: 280 case EM_ARM:
277 case EM_AARCH64: 281 case EM_AARCH64:
282 case EM_MICROBLAZE:
278 case EM_MIPS: 283 case EM_MIPS:
279 break; 284 break;
280 } /* end switch */ 285 } /* end switch */