Changes

263 bytes added ,  05:27, 31 August 2019
Line 140: Line 140:  
Then, it calls the kernel's libc .init_array functions.
 
Then, it calls the kernel's libc .init_array functions.
 
<pre>
 
<pre>
// TODO: Fill this out with pseudocode.
+
// This is standard libc init_array code, but called for the kernel's binary instead of kernelldr's.
 +
for (uintptr_t cur_func = final_virtual_kernel_base + init_array_offset; cur_func < final_virtual_kernel_base + init_array_end_offset; cur_func += 8) {
 +
    ((void (*)(void))(*(uint64_t *)cur_func)();
 +
}
 
</pre>
 
</pre>