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>
This commit is contained in:
Will Deacon
2013-05-08 17:29:24 +01:00
committed by Catalin Marinas
parent 73150c983a
commit adace89562
3 changed files with 7 additions and 9 deletions

View File

@@ -56,7 +56,7 @@ SECTIONS
}
RO_DATA(PAGE_SIZE)
EXCEPTION_TABLE(8)
_etext = .; /* End of text and rodata section */
. = ALIGN(PAGE_SIZE);
@@ -98,14 +98,6 @@ SECTIONS
CACHELINE_ALIGNED_DATA(64)
READ_MOSTLY_DATA(64)
/*
* The exception fixup table (might need resorting at runtime)
*/
. = ALIGN(32);
__start___ex_table = .;
*(__ex_table)
__stop___ex_table = .;
/*
* and the usual data section
*/