Hi,
There is a hold between the guaranteed 14MB if exist and rest of the free memory.
How would one write a linker script so say a kernel larger than 14 MB can be loaded at 1M location as it will be necessary to let linker aware of the hole.
I am no master of linker script. Only way I can think of is to do trail and error and find out where is the approximate cutoff of 14 MB in code. Then setup a section at the cutoff and advance the location counter to accommodate the hole. But this method is tedious. May I ask is there any other way or we should just not load at 1M if kernel is larger than 14 MB?
Kernel Larger than 14 MB linker script
Re: Kernel Larger than 14 MB linker script
Not even my Linux kernel is that large. If my kernel was so large that it caused problems with the available physical memory, I think I would go with a loader kernel. That is, create a second kernel that sets up paging and then jumps to the original kernel. The original kernel is then a normal ELF executable, only with a really high .text address. If the original kernel is loaded as module or initrd, GRUB (or whatever) will be able to put it wherever it fits. And using virtual memory means even the kernel itself does not really need to care where it was loaded.
Anyway, I don't think that a linker script is the right way to address this.
Anyway, I don't think that a linker script is the right way to address this.
Carpe diem!