With load_elf() api, image load low address and high address is converted to physical address if parameter translate_fn is provided. However executing entry address is still virtual address. Here convert entry address into physical address, since MMU is disabled when system power on, the first PC instruction should be physical address. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Song Gao <gaosong@loongson.cn>
30 lines
386 B
Text
30 lines
386 B
Text
ENTRY(_start)
|
|
|
|
SECTIONS
|
|
{
|
|
/* Linux kernel legacy start address. */
|
|
. = 0x200000;
|
|
_text = .;
|
|
.text : {
|
|
*(.text)
|
|
}
|
|
.rodata : {
|
|
*(.rodata)
|
|
}
|
|
_etext = .;
|
|
|
|
. = ALIGN(8192);
|
|
_data = .;
|
|
.got : {
|
|
*(.got)
|
|
}
|
|
.data : {
|
|
*(.sdata)
|
|
*(.data)
|
|
}
|
|
_edata = .;
|
|
.bss : {
|
|
*(.bss)
|
|
}
|
|
_end = .;
|
|
}
|