This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ARM and elf format.

Note: This was originally posted on 3rd March 2013 at http://forums.arm.com

Hello
I'm analyzing some ARM boot loader codes and writing my own boot loader to use ARM trustzone and virtual extension on Cortex A15 using versatile express on Fast Model.But I couldn't understand some topics. I will very appreciate if someone could help me.

1. Many boot loader samples have their own linker script which is used in compile time. But I found that their entry point is located at a position far from 0x00000000.I learned that when processor is powered on, program counter points to zero, and exception vector is at the position. But when I loaded the sample boot loader, pc was pointing the entry point based on linker script, not zero. And even when an exception was occurred, it works very well, I mean, exception vector is located from the entry point, not zero.


2. Are their any relationships between elf format and ARM core?When i started model debugger in Fast model, I passed the file name of elf file I compiled. It has instructions in addition to the elf header and some other information.So it is not a pure code package. I think that the input file should be a pure code package. Addition information does not be needed. I think model debugger should read the pure binary file and load it to 0x00000000 and then power core on. But elf file works very well and pure binary does not work.


As I mentioned at first and second problems, I am supposing that there are some relations between elf format and ARM core or Fast model. I am very confusing. Does one vendor support specific format? I don' think so. But fast model reads elf format file and set the first pc location and start of the exception vector to the position elf format points.So I want to understand why real ARM core of Fast model are related to elf format and how initial value of pc and exception vector are changed based on elf file and linker script.
0