mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-13 18:51:01 +01:00
[stage2] Fix the ordering of rules in linker script
This commit is contained in:
parent
700f92162d
commit
7695b5bdbd
@ -15,13 +15,32 @@ SECTIONS
|
||||
PROVIDE(__start__ = 0xFFF00000);
|
||||
. = __start__;
|
||||
. = ALIGN(32);
|
||||
.text :
|
||||
|
||||
.crt0 :
|
||||
{
|
||||
. = ALIGN(32);
|
||||
/* .init */
|
||||
KEEP( *(.text.start) )
|
||||
KEEP( *(.init) )
|
||||
. = ALIGN(4);
|
||||
} >main
|
||||
|
||||
.chainloader :
|
||||
{
|
||||
. = ALIGN(32);
|
||||
PROVIDE (__chainloader_start = .);
|
||||
KEEP(*(.chainloader.text.start))
|
||||
build/chainloader.o(.text*)
|
||||
build/chainloader.o(.rodata*)
|
||||
build/chainloader.o(.data*)
|
||||
. = ALIGN(8);
|
||||
build/chainloader.o(.bss* COMMON)
|
||||
. = ALIGN(8);
|
||||
PROVIDE (__chainloader_end = .);
|
||||
} >low_iram AT>main
|
||||
|
||||
.text :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
|
||||
/* .text */
|
||||
*(.text)
|
||||
@ -102,20 +121,6 @@ SECTIONS
|
||||
. = ALIGN(4);
|
||||
} >main
|
||||
|
||||
.chainloader :
|
||||
{
|
||||
. = ALIGN(32);
|
||||
PROVIDE (__chainloader_start = .);
|
||||
KEEP(*(.chainloader.text.start))
|
||||
build/chainloader.o(.text*)
|
||||
build/chainloader.o(.rodata*)
|
||||
build/chainloader.o(.data*)
|
||||
. = ALIGN(8);
|
||||
build/chainloader.o(.bss*)
|
||||
. = ALIGN(32);
|
||||
PROVIDE (__chainloader_end = .);
|
||||
} >low_iram AT>main
|
||||
|
||||
.bss :
|
||||
{
|
||||
__bss_start__ = ALIGN(32);
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "chainloader.h"
|
||||
|
||||
uint8_t g_payload_arg_data[PAYLOAD_ARG_DATA_MAX_SIZE] = {1};
|
||||
uint8_t __attribute__((used)) g_payload_arg_data[PAYLOAD_ARG_DATA_MAX_SIZE] = {0};
|
||||
|
||||
#pragma GCC optimize (3)
|
||||
void relocate_and_chainload_main(uintptr_t load_address, uintptr_t src_address, size_t size, int argc) {
|
||||
|
Loading…
Reference in New Issue
Block a user