* [PATCH] microblaze: extable: Sort the exception table at build time
@ 2013-12-20 9:29 Michal Simek
2013-12-20 16:13 ` David Daney
0 siblings, 1 reply; 2+ messages in thread
From: Michal Simek @ 2013-12-20 9:29 UTC (permalink / raw)
To: linux-kernel, monstr
Cc: David Daney, Andrew Morton, Catalin Marinas, Will Deacon,
microblaze-uclinux
[-- Attachment #1: Type: text/plain, Size: 1491 bytes --]
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:
"arm64: extable: sort the exception table at build time"
(sha1: adace89562c7a9645b8dc84f6e1ac7ba8756094e)
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
arch/microblaze/Kconfig | 1 +
scripts/sortextable.c | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index e23cccd..8d581ab 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -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
diff --git a/scripts/sortextable.c b/scripts/sortextable.c
index 7941fbd..cc49062 100644
--- a/scripts/sortextable.c
+++ b/scripts/sortextable.c
@@ -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 */
@@ -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 */
--
1.8.2.3
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] microblaze: extable: Sort the exception table at build time
2013-12-20 9:29 [PATCH] microblaze: extable: Sort the exception table at build time Michal Simek
@ 2013-12-20 16:13 ` David Daney
0 siblings, 0 replies; 2+ messages in thread
From: David Daney @ 2013-12-20 16:13 UTC (permalink / raw)
To: Michal Simek
Cc: linux-kernel, monstr, David Daney, Andrew Morton, Catalin Marinas,
Will Deacon, microblaze-uclinux
On 12/20/2013 01:29 AM, Michal Simek wrote:
> 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:
> "arm64: extable: sort the exception table at build time"
> (sha1: adace89562c7a9645b8dc84f6e1ac7ba8756094e)
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This seems plausible, I didn't test it, but this is how it is supposed
to work, so...
Acked-by: David Daney <david.daney@cavium.com>
> ---
>
> arch/microblaze/Kconfig | 1 +
> scripts/sortextable.c | 5 +++++
> 2 files changed, 6 insertions(+)
>
> diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
> index e23cccd..8d581ab 100644
> --- a/arch/microblaze/Kconfig
> +++ b/arch/microblaze/Kconfig
> @@ -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
> diff --git a/scripts/sortextable.c b/scripts/sortextable.c
> index 7941fbd..cc49062 100644
> --- a/scripts/sortextable.c
> +++ b/scripts/sortextable.c
> @@ -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 */
> @@ -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 */
> --
> 1.8.2.3
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-20 16:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-20 9:29 [PATCH] microblaze: extable: Sort the exception table at build time Michal Simek
2013-12-20 16:13 ` David Daney
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.