From c55ff680d41fbd85a1b37585eda47fcd71c1e5b1 Mon Sep 17 00:00:00 2001 From: greg Date: Thu, 30 Mar 2017 02:44:32 -0700 Subject: [PATCH] rust linker script --- ferrocyanide/raspi_os/rust_linker_script.ld | 43 +++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/ferrocyanide/raspi_os/rust_linker_script.ld b/ferrocyanide/raspi_os/rust_linker_script.ld index e69de29..845f257 100644 --- a/ferrocyanide/raspi_os/rust_linker_script.ld +++ b/ferrocyanide/raspi_os/rust_linker_script.ld @@ -0,0 +1,43 @@ +ENTRY(_start) + +SECTIONS { + + . = 0x8000; + _start = .; + + _text_start = .; + .text : + { + KEEP(*(.text.boot)) + *(.text) + } + . = ALIGN(4096); + _text_end = .; + + _rodata_start = .; + .rodata : + { + *(.rodata); + } + . = ALIGN(4096); + _rodata_end = .; + + _data_start = .; + .data : + { + *(.data) + } + . = ALIGN(4096); + _data_end = .; + + + _bss_start = .; + .bss : + { + *(.bss) + } + . = ALIGN(4096); + _bss_end = .; + + _end = .; +}