refactor(linker): 📦 Share exception handlers
This commit is contained in:
parent
4598330506
commit
78a864c433
|
@ -97,3 +97,5 @@ SECTIONS
|
|||
|
||||
/DISCARD/ : { *(.comment) *(.gnu*) *(.note*) *(.eh_frame*) *(.text.boot*)}
|
||||
}
|
||||
|
||||
INCLUDE linker/aarch64-exceptions.ld
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
PROVIDE(current_el0_synchronous = default_exception_handler);
|
||||
PROVIDE(current_el0_irq = default_exception_handler);
|
||||
PROVIDE(current_el0_fiq = default_exception_handler);
|
||||
PROVIDE(current_el0_serror = default_exception_handler);
|
||||
|
||||
PROVIDE(current_elx_synchronous = default_exception_handler);
|
||||
PROVIDE(current_elx_irq = default_exception_handler);
|
||||
PROVIDE(current_elx_fiq = default_exception_handler);
|
||||
PROVIDE(current_elx_serror = default_exception_handler);
|
||||
|
||||
PROVIDE(lower_aarch64_synchronous = default_exception_handler);
|
||||
PROVIDE(lower_aarch64_irq = default_exception_handler);
|
||||
PROVIDE(lower_aarch64_fiq = default_exception_handler);
|
||||
PROVIDE(lower_aarch64_serror = default_exception_handler);
|
||||
|
||||
PROVIDE(lower_aarch32_synchronous = default_exception_handler);
|
||||
PROVIDE(lower_aarch32_irq = default_exception_handler);
|
||||
PROVIDE(lower_aarch32_fiq = default_exception_handler);
|
||||
PROVIDE(lower_aarch32_serror = default_exception_handler);
|
|
@ -65,22 +65,4 @@ SECTIONS
|
|||
/DISCARD/ : { *(.comment) *(.gnu*) *(.note*) *(.eh_frame*) *(.text.chainboot*) }
|
||||
}
|
||||
|
||||
PROVIDE(current_el0_synchronous = default_exception_handler);
|
||||
PROVIDE(current_el0_irq = default_exception_handler);
|
||||
PROVIDE(current_el0_fiq = default_exception_handler);
|
||||
PROVIDE(current_el0_serror = default_exception_handler);
|
||||
|
||||
PROVIDE(current_elx_synchronous = default_exception_handler);
|
||||
PROVIDE(current_elx_irq = default_exception_handler);
|
||||
PROVIDE(current_elx_fiq = default_exception_handler);
|
||||
PROVIDE(current_elx_serror = default_exception_handler);
|
||||
|
||||
PROVIDE(lower_aarch64_synchronous = default_exception_handler);
|
||||
PROVIDE(lower_aarch64_irq = default_exception_handler);
|
||||
PROVIDE(lower_aarch64_fiq = default_exception_handler);
|
||||
PROVIDE(lower_aarch64_serror = default_exception_handler);
|
||||
|
||||
PROVIDE(lower_aarch32_synchronous = default_exception_handler);
|
||||
PROVIDE(lower_aarch32_irq = default_exception_handler);
|
||||
PROVIDE(lower_aarch32_fiq = default_exception_handler);
|
||||
PROVIDE(lower_aarch32_serror = default_exception_handler);
|
||||
INCLUDE linker/aarch64-exceptions.ld
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
const LINKER_SCRIPT: &str = "linker/aarch64.ld";
|
||||
const LINKER_SCRIPT_AUX: &str = "linker/aarch64-exceptions.ld";
|
||||
|
||||
fn main() {
|
||||
println!("cargo:rerun-if-changed={}", LINKER_SCRIPT);
|
||||
println!("cargo:rerun-if-changed={}", LINKER_SCRIPT_AUX);
|
||||
println!("cargo:rustc-link-arg=--script={}", LINKER_SCRIPT);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue