Simplify romstage.ld for armv7
This is still a work-in-progress, but it seems to work better than before and is less complicated... Change-Id: I6f730d017391f9ec4401cdfd34931c869df10a9e Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Signed-off-by: David Hendricks <dhendrix@chromium.org> Reviewed-on: http://review.coreboot.org/2041 Tested-by: build bot (Jenkins)
This commit is contained in:
parent
32675175ef
commit
37a8516370
|
@ -29,7 +29,7 @@
|
|||
* FIXME 2: Somehow linker didn't like CONFIG_SPL_MAX_SIZE and CONFIG_SPL_TEXT_BASE...
|
||||
*/
|
||||
/* MEMORY { .sram : ORIGIN = 0x02023400, LENGTH = 0x3800 } */
|
||||
MEMORY { .sram : ORIGIN = 0x02023400, LENGTH = 0x10000 }
|
||||
/*MEMORY { .sram : ORIGIN = 0x02023400, LENGTH = 0x10000 }*/
|
||||
|
||||
/* We use ELF as output format. So that we can debug the code in some form. */
|
||||
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
|
||||
|
@ -39,58 +39,20 @@ ENTRY(_start)
|
|||
|
||||
SECTIONS
|
||||
{
|
||||
. = ROMSTAGE_BASE;
|
||||
/* FIXME: replace this with CPU-specific Kconfig variable */
|
||||
. = 0x02023400; /* Exynos5 */
|
||||
|
||||
/*
|
||||
.rom . : {
|
||||
.romtext . : {
|
||||
_rom = .;
|
||||
*(.rom.text);
|
||||
*(.rom.data);
|
||||
*(.text);
|
||||
}
|
||||
|
||||
.romdata . : {
|
||||
*(.rodata);
|
||||
*(.rodata.*);
|
||||
*(.rom.data.*);
|
||||
. = ALIGN(16);
|
||||
*(.machine_param);
|
||||
. = ALIGN(8);
|
||||
_erom = .;
|
||||
}
|
||||
*/
|
||||
|
||||
/* First we place the code and read only data (typically const declared).
|
||||
* This could theoretically be placed in rom.
|
||||
*/
|
||||
.text : {
|
||||
_text = .;
|
||||
*(.text);
|
||||
*(.text.*);
|
||||
. = ALIGN(4);
|
||||
_etext = .;
|
||||
} >.sram
|
||||
|
||||
.rodata : {
|
||||
_rodata = .;
|
||||
. = ALIGN(4);
|
||||
cpu_drivers = . ;
|
||||
*(.rodata.cpu_driver)
|
||||
ecpu_drivers = . ;
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
/* kevinh/Ispiri - Added an align, because the objcopy tool
|
||||
* incorrectly converts sections that are not long word aligned.
|
||||
*/
|
||||
. = ALIGN(4);
|
||||
|
||||
_erodata = .;
|
||||
} >.sram
|
||||
/* After the code we place initialized data (typically initialized
|
||||
* global variables). This gets copied into ram by startup code.
|
||||
* __data_start and __data_end shows where in ram this should be placed,
|
||||
* whereas __data_loadstart and __data_loadend shows where in rom to
|
||||
* copy from.
|
||||
*/
|
||||
.data : {
|
||||
_data = .;
|
||||
*(.data)
|
||||
_edata = .;
|
||||
} >.sram
|
||||
|
||||
__image_copy_end = .;
|
||||
|
||||
|
@ -99,12 +61,12 @@ SECTIONS
|
|||
* crt0.S fills between _bss and _ebss with zeroes.
|
||||
*/
|
||||
.bss . : {
|
||||
. = ALIGN(4);
|
||||
. = ALIGN(8);
|
||||
_bss = .;
|
||||
*(.bss)
|
||||
*(.sbss)
|
||||
*(COMMON)
|
||||
} >.sram
|
||||
}
|
||||
_ebss = .;
|
||||
_end = .;
|
||||
|
||||
|
|
Loading…
Reference in New Issue