[U-Boot-Users] Re: Debugging U-boot after relocation
llandre
r&d at wawnet.biz
Thu Mar 20 19:08:18 CET 2003
Hi Vladimir.
I've just read a your message about the debugging after relocation, posted
last month. I encountered the same problem when I worked with ARM
processors with the GCC cross compiler. In this case I solved the problem
placing all the relocated code in specific sections. These section must
have proper VMA and LMA that are set in the linker script.
For example here is a piece of the script I used:
---------------------------------------------------------------------
SECTIONS
{
[...]
.text 0xcf00000 : AT ((LOADADDR ( .fixed_text ) + SIZEOF (
.fixed_text ) + 4 - 1) & ~ (4 - 1))
{
_stext = ABSOLUTE(.);
PROVIDE (__stext = ABSOLUTE(.));
*(.text*)
*(.gnu.warning)
*(.gnu.linkonce.t.*)
*(.init)
*(.glue_7)
*(.glue_7t)
} > SDRAM
__rom_text_start = LOADADDR (.text);
_etext = .;
PROVIDE (__etext = .);
[...]
}
---------------------------------------------------------------------
What do you think about it?
PS: I was writing this letter when I received your answer about the
compiler optimizations: thank you very much for the suggestion.
llandre
More information about the U-Boot
mailing list