on the final stage of the boot process of raspberry. The start.elf loads kernel.img which is the binary file containing the OS kernel and releases the reset on the CPU.

I have two questions

1 does the kernel.img file loaded to physical @0x00000000 or 0x00008000, because i read somewhere that the entry point is located at address 0x00008000,

2 when the entry point specified by the linker script is different then 0x00000000, for example 0x00008000, what happened to the space between 0x0000000 and the entry point (0x00008000) in the binary file kernel.img, does the file include this space on it's size?, and does it copied to the RAM at 0x00000000 address?


The area 0x0-0x8000 is reserved for special purposes, like passing ATAGS and the kernel command line etc. from the bootloader. It does not occupy space on disk (there is a hole in the image).

  • 1
    sorry but i dont get this concept of a hole?? how can a file have a hole?? – mikmik Jan 1 '15 at 19:30
  • The image is loaded to 0x8000. With the linker script you specify where data are to be loaded, thus the space between the end of one linker script section and the beginning of next may become "a hole". – Ronny Nilsson Jan 1 '15 at 19:46
  • sorry but i noticed when i put sections in different addresses, the resulting binary file become really bigger, so the hole between sections is included in the image size. but between the @0 and 0x8000, no more space is occupied, what's the difference?? – mikmik Jan 1 '15 at 20:37
  • 1
    It is possible to specify with the linker script what to do with the holes. You can tell ld not "fill" the holes (usually with 0x00 or 0xff) but instead discard them. If the image begins with a hole ld likely discards it automatically (although haven't verified it). It's all in the ld manual. :) – Ronny Nilsson Jan 1 '15 at 21:10
  • Which document describes that "The area 0x0-0x8000 is reserved for special purposes" ? Could you let me know where can I find it ? – robomon Sep 10 '15 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.