Re: link time analysis for the kernel.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
 
11.10.2018, 22:55, "Carter Cheng" <cartercheng@xxxxxxxxx>:
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?).
 
 
 
Also if examine the phase-by phase
 
source code
compilation
object file
linking
executable <- elf file creating
 
I think you can analyze to the compilation and linking process so kernel will send it to the screen while it is already compile mesage.
 
please read web site:
 
http://www.cirosantilli.com/elf-hello-world/
 
Ozgur
 
On Fri, Oct 12, 2018 at 2:02 AM <o@xxxxxxxxxx> wrote:
 
 
11.10.2018, 17:48, "Carter Cheng" <cartercheng@xxxxxxxxx>:
Hi,
 
 
Hello,
 
I want to ask pardon me and have you ever compiled a linux kernel?
In my opinion you should first examine gcc ld and make process :)
 
The elf format executable format and  the process after compiling the c code.
Please read:
 
 
keep calm and go step by step and continue to learn c, gcc, ld, make, c code compile to machine code.
 
Ozgur
 
 
 
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)?
 
Regards,
 
Carter.
,

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux