kern: Support older SVC ABIs

This commit is contained in:
Michael Scire authored and SciresM committed 2020-07-31 14:50:52 -07:00
1 parent 3d2eb8e903
commit ff022115ca
7 files changed
+94 -21

No files matched your search

@@ -318,6 +318,8 @@ namespace ams::kern::init::loader {
Elf::ApplyRelocations(GetInteger(virtual_base_address), kernel_dynamic);
/* Call the kernel's init array functions. */
/* NOTE: The kernel does this after reprotecting .rodata, but we do it before. */
/* This allows our global constructors to edit .rodata, which is valuable for editing the SVC tables to support older firmwares' ABIs. */
Elf::CallInitArrayFuncs(GetInteger(virtual_base_address) + init_array_offset, GetInteger(virtual_base_address) + init_array_end_offset);
/* Reprotect .rodata as R-- */