diff options
author | vetch <vetch97@gmail.com> | 2019-10-15 15:44:41 +0200 |
---|---|---|
committer | vetch <vetch97@gmail.com> | 2019-10-15 15:44:41 +0200 |
commit | e20129720adb334f46e329bfbe7090ee7188caac (patch) | |
tree | 4a8fab2da509d5e870ddbf64cf6521c110b7e0cf /loader_stage1.ld | |
parent | 8de2ff74293a583fbf4cd9a87a8bf29c0c93d5a8 (diff) | |
parent | 0921cc609a1b411d2b6769a327fa11a675ac3d3a (diff) | |
download | rpi-MMU-example-e20129720adb334f46e329bfbe7090ee7188caac.tar.gz rpi-MMU-example-e20129720adb334f46e329bfbe7090ee7188caac.zip |
Merge branch 'bob' into alice
Diffstat (limited to 'loader_stage1.ld')
-rw-r--r-- | loader_stage1.ld | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/loader_stage1.ld b/loader_stage1.ld new file mode 100644 index 0000000..ce11095 --- /dev/null +++ b/loader_stage1.ld @@ -0,0 +1,47 @@ +ENTRY(_start) + +SECTIONS +{ + /* Starts at LOADER_ADDR. */ + /* Warning! Internet says RPis in 32-bit mode load binary at 0x8000! */ + /* My experiments do, however, show, that qemu emulating RPi2 */ + /* loads it at 0x10000! (took some pain to find out) */ + . = 0x10000; + /* For AArch64, use . = 0x80000; Unless this too is wrong */ + __start = .; + __text_start = .; + .text : + { + KEEP(*(.text.boot)) + *(.text) + } + . = ALIGN(4096); /* align to page size */ + __text_end = .; + + __rodata_start = .; + .rodata : + { + *(.rodata) + } + . = ALIGN(4096); /* align to page size */ + __rodata_end = .; + + __data_start = .; + .data : + { + *(.data) + } + . = ALIGN(4096); /* align to page size */ + __data_end = .; + + __bss_start = .; + .bss : + { + bss = .; + *(.bss) + } + . = ALIGN(4096); /* align to page size */ + __bss_end = .; + __bss_size = __bss_end - __bss_start; + __end = .; +} |