<div dir="ltr">sorry not a kernel loader but an ELF loader.</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Oct 12, 2018 at 2:55 AM Carter Cheng <<a href="mailto:cartercheng@gmail.com">cartercheng@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Actually I have compiled and installed kernels before. I am wondering however if LTO still works for compiling kernel images on clang or gcc since my understanding is the kernel code includes a kernel loader which loads the ELF format but the image of an OS kernel is loaded either directly or via a bootloader which my understanding is cannot read ELF(is this correct?).<div><br></div><div> </div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Oct 12, 2018 at 2:02 AM <<a href="mailto:o@goosey.org" target="_blank">o@goosey.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div> </div><div> </div><div>11.10.2018, 17:48, "Carter Cheng" <<a href="mailto:cartercheng@gmail.com" target="_blank">cartercheng@gmail.com</a>>:</div><blockquote type="cite"><div><div>Hi,</div><div> </div></div></blockquote><div> </div><div>Hello,</div><div> </div><div>I want to ask pardon me and have you ever compiled a linux kernel?</div><div><div>In my opinion you should first examine gcc ld and make process :)</div><div> </div><div>The elf format executable format and  the process after compiling the c code.</div><div>Please read:</div><div> </div><div><a href="http://www.ntu.edu.sg/home/ehchua/programming/cpp/gcc_make.html" target="_blank">http://www.ntu.edu.sg/home/ehchua/programming/cpp/gcc_make.html</a></div><div> </div><div>keep calm and go step by step and continue to learn c, gcc, ld, make, c code compile to machine code.</div><div> </div><div>Ozgur</div><div> </div><div> </div><div> </div></div><blockquote type="cite"><div>There are some detaills about the current procedures for linking the kernel that I am unfamiliar with. My understanding is that GCC and Clang both have the ability to do link time analysis and transforms on code but is it possible to write link time passes that will run on the kernel since the linking phase is a bit different (i.e. doesnt produce an ELF file)?<div> </div><div>Regards,</div><div> </div><div>Carter.</div></div>,<p>_______________________________________________<br>Kernelnewbies mailing list<br><a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.org</a><br><a href="https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a></p></blockquote></blockquote></div>
</blockquote></div>