aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/sortextable.c
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2013-05-08 12:29:24 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2013-06-12 06:23:01 -0400
commitadace89562c7a9645b8dc84f6e1ac7ba8756094e (patch)
tree8a2cef419d80b54769da7cf5853ff4292f9e8237 /scripts/sortextable.c
parent73150c983ac1f9b7653cfd3823b1ad4a44aad3bf (diff)
arm64: extable: sort the exception table at build time
As is done for other architectures, sort the exception table at build-time rather than during boot. Since sortextable appears to be a standalone C program relying on the host elf.h to provide EM_AARCH64, I've had to add a conditional check in order to allow cross-compilation on machines that aren't running a bleeding-edge libc-dev. Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'scripts/sortextable.c')
-rw-r--r--scripts/sortextable.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/sortextable.c b/scripts/sortextable.c
index 1f10e89d15b4..f9ce1160419b 100644
--- a/scripts/sortextable.c
+++ b/scripts/sortextable.c
@@ -31,6 +31,10 @@
31#include <tools/be_byteshift.h> 31#include <tools/be_byteshift.h>
32#include <tools/le_byteshift.h> 32#include <tools/le_byteshift.h>
33 33
34#ifndef EM_AARCH64
35#define EM_AARCH64 183
36#endif
37
34static int fd_map; /* File descriptor for file being modified. */ 38static int fd_map; /* File descriptor for file being modified. */
35static int mmap_failed; /* Boolean flag. */ 39static int mmap_failed; /* Boolean flag. */
36static void *ehdr_curr; /* current ElfXX_Ehdr * for resource cleanup */ 40static void *ehdr_curr; /* current ElfXX_Ehdr * for resource cleanup */
@@ -249,6 +253,7 @@ do_file(char const *const fname)
249 custom_sort = sort_relative_table; 253 custom_sort = sort_relative_table;
250 break; 254 break;
251 case EM_ARM: 255 case EM_ARM:
256 case EM_AARCH64:
252 case EM_MIPS: 257 case EM_MIPS:
253 break; 258 break;
254 } /* end switch */ 259 } /* end switch */