Last change
on this file since 1044 was
949,
checked in by cfuguet, 10 years ago
|
preloader: when loading LINUX, copy the DTB in low memory addresses
|
File size:
811 bytes
|
Rev | Line | |
---|
[759] | 1 | /** |
---|
| 2 | * \file : preloader.ld.in |
---|
| 3 | * \author : Cesar Fuguet |
---|
| 4 | * \date : July 24, 2014 |
---|
| 5 | * |
---|
| 6 | * \brief : preloader ldscript template |
---|
| 7 | * \note : must be compiled with gcc to generate an instance |
---|
| 8 | */ |
---|
| 9 | |
---|
| 10 | #include <defs.h> |
---|
| 11 | |
---|
| 12 | /* Definition of the base address for code segment */ |
---|
| 13 | |
---|
[804] | 14 | seg_code_base = RESET_ADDRESS; |
---|
[759] | 15 | seg_data_base = SEG_RAM_BASE + SEG_RAM_SIZE - RESET_STACK_SIZE - 0x4000; |
---|
| 16 | |
---|
| 17 | /* Grouping sections into segments */ |
---|
| 18 | |
---|
| 19 | ENTRY(reset) |
---|
| 20 | |
---|
| 21 | SECTIONS |
---|
| 22 | { |
---|
| 23 | . = seg_code_base; |
---|
| 24 | .text : |
---|
| 25 | { |
---|
| 26 | *(.reset) |
---|
[949] | 27 | *(.text) |
---|
[759] | 28 | . = ALIGN(0x4); |
---|
[949] | 29 | dtb_start = .; |
---|
[794] | 30 | #if USE_DT == 1 |
---|
[759] | 31 | INCLUDE "build/platform.ld"; |
---|
[794] | 32 | #endif |
---|
[949] | 33 | dtb_end = .; |
---|
| 34 | *(.rodata) |
---|
| 35 | *(.rodata.*) |
---|
[759] | 36 | } |
---|
| 37 | |
---|
| 38 | . = seg_data_base; |
---|
| 39 | .bss ALIGN(0x4) (NOLOAD) : |
---|
| 40 | { |
---|
| 41 | *(.data) |
---|
| 42 | *(.bss) |
---|
[930] | 43 | *(COMMON) |
---|
[759] | 44 | } |
---|
| 45 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.