LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Why different linker scripts for vmlinux at different locations ? (https://www.linuxquestions.org/questions/linux-kernel-70/why-different-linker-scripts-for-vmlinux-at-different-locations-4175601899/)

akhilbaai 03-16-2017 05:36 AM

Why different linker scripts for vmlinux at different locations ?
 
Hi,

I'm a kernel newbie and started going through the code recently.
I came across two vmlinux.lds linker scripts under
[1] arch/x86/boot/compressed
[2] arch/x86/kernel
There is vmlinux binary present in each of the above directories.
In what way these both are different ?
In one of the linker script the location counter is set as below in the beginning.
. = 0xC0000000 + ((0x1000000 + (0x1000000 - 1)) & ~(0x1000000 - 1))
Is there a specific reason for this calculation to generate starting address as 0xC1000000 ?

dijetlo 03-17-2017 12:54 AM

Quote:

I'm a kernel newbie and started going through the code recently.
Start here


All times are GMT -5. The time now is 01:07 PM.