Skip to content

Commit

Permalink
microblaze: extable: sort the exception table at build time
Browse files Browse the repository at this point in the history
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 adace89 ("arm64: extable: sort the
exception table at build time").

Signed-off-by: Michal Simek <[email protected]>
Acked-by: David Daney <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Will Deacon <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Michal Simek authored and torvalds committed Jan 24, 2014
1 parent 3fdb38b commit 372c720
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/microblaze/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ config MICROBLAZE
select MODULES_USE_ELF_RELA
select CLONE_BACKWARDS3
select CLKSRC_OF
select BUILDTIME_EXTABLE_SORT

config SWAP
def_bool n
Expand Down
5 changes: 5 additions & 0 deletions scripts/sortextable.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
#define EM_AARCH64 183
#endif

#ifndef EM_MICROBLAZE
#define EM_MICROBLAZE 189
#endif

static int fd_map; /* File descriptor for file being modified. */
static int mmap_failed; /* Boolean flag. */
static void *ehdr_curr; /* current ElfXX_Ehdr * for resource cleanup */
Expand Down Expand Up @@ -275,6 +279,7 @@ do_file(char const *const fname)
case EM_ARCOMPACT:
case EM_ARM:
case EM_AARCH64:
case EM_MICROBLAZE:
case EM_MIPS:
break;
} /* end switch */
Expand Down

0 comments on commit 372c720

Please sign in to comment.