Add some stuff to help with using C in link.ld
This commit is contained in:
25
link.ld
25
link.ld
@@ -1,22 +1,31 @@
|
||||
ENTRY(_start)
|
||||
|
||||
SECTIONS {
|
||||
. = 0x80000000;
|
||||
|
||||
.text : ALIGN(4) {
|
||||
*(.text*)
|
||||
MEMORY {
|
||||
RAM (rwx) : ORIGIN = 0x80000000, LENGTH = 1M
|
||||
}
|
||||
|
||||
SECTIONS {
|
||||
.text : ALIGN(4) {
|
||||
*(.text._start)
|
||||
*(.text*)
|
||||
} > RAM
|
||||
|
||||
.rodata : ALIGN(8) {
|
||||
*(.rodata*)
|
||||
}
|
||||
} > RAM
|
||||
|
||||
.data : ALIGN(8) {
|
||||
_data = .;
|
||||
*(.data*)
|
||||
}
|
||||
_edata = .;
|
||||
} > RAM
|
||||
|
||||
.bss : ALIGN(8) {
|
||||
_bss = .;
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
}
|
||||
_ebss = .;
|
||||
} > RAM
|
||||
|
||||
_stack_top = ORIGIN(RAM) + LENGTH(RAM);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user