Hi<br><br>I have been trying to use the &quot;bootelf&quot; command of u-boot. I&nbsp; noticed that if the&nbsp; program text is based at address 0x0 the command fails because the .text section does not copied by the load_elf_image function (even though the correct entry point is returned by load_elf_image). The same test program I have boots correctly if the .text section is placed elsewhere.
<br><br>The reason the .text section is not copied is because it it is skipped due to the block.<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (!(shdr-&gt;sh_flags &amp; SHF_ALLOC)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; || shdr-&gt;sh_addr == 0 || shdr-&gt;sh_size == 0) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; continue;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br><br>because shdr-&gt;sh_addr = 0. <br><br>I put in a few printfs to print information for each section, and I can see that various debug sections, symbol table etc have sh_addr = 0 and certainly they shouldn&#39;t be loaded, but the clause &quot;!(shdr-&gt;sh_flags &amp; SHF_ALLOC)&quot; takes care of these anyway - (admittedly only for my particular ELF!). So I removed the &quot;shdr-&gt;sh_addr == 0&quot; check, recompiled u-boot (which for me is not based at 0x0!) and was able to boot my ELF.
<br><br>Perhaps the &quot;shdr-&gt;sh_addr == 0&quot; clause filters out sections for other types of ELFs - but should another mechanism be used to remove them from the list? In the case of my ARM 926ejs target the .text needs to be based at 0x0 since the interrupt vectors have to be place at 0x0. 
<br><br>This is my first posting here, I apologize in advance if there is an obvious answer to my question.<br><br>Ali<br><br><br>