mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-30 06:25:20 -04:00
kern/ldr: enable the use of relr for relocations
This commit is contained in:
parent
423a05a1e9
commit
027e209073
6 changed files with 17 additions and 13 deletions
|
@ -15,8 +15,8 @@
|
|||
*/
|
||||
#include <mesosphere.hpp>
|
||||
|
||||
extern "C" void _start();
|
||||
extern "C" void __end__();
|
||||
extern "C" void __bin_start__();
|
||||
extern "C" void __bin_end__();
|
||||
|
||||
namespace ams::kern {
|
||||
|
||||
|
@ -264,8 +264,8 @@ namespace ams::kern::init {
|
|||
KMemoryLayout::GetPhysicalMemoryRegionTree().InsertDirectly(KernelPhysicalAddressSpaceBase, KernelPhysicalAddressSpaceBase + KernelPhysicalAddressSpaceSize - 1);
|
||||
|
||||
/* Save start and end for ease of use. */
|
||||
const uintptr_t code_start_virt_addr = reinterpret_cast<uintptr_t>(_start);
|
||||
const uintptr_t code_end_virt_addr = reinterpret_cast<uintptr_t>(__end__);
|
||||
const uintptr_t code_start_virt_addr = reinterpret_cast<uintptr_t>(__bin_start__);
|
||||
const uintptr_t code_end_virt_addr = reinterpret_cast<uintptr_t>(__bin_end__);
|
||||
|
||||
/* Setup the containing kernel region. */
|
||||
constexpr size_t KernelRegionSize = 1_GB;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue