On 22/08/2016:05:10:17 PM, AKASHI Takahiro wrote: > On Fri, Aug 19, 2016 at 03:44:23PM +0530, Pratyush Anand wrote: > > page_offset is the virtual address of phys_offset, right? > > > > ehdr.e_entry is the virtual address of "kernel Code Start PA", right? > > > > If yes, then why should n't above be correct for all linear regions. > > What I was thinking of is that we'd better fake arm64_mem.text_offset > instead of calculating a page_offset because text_offset is also used > in arm64_load_other_segments(). Here, if the first segment doesn't not > contain kernel text, image_base will be incorrect. IMHO, we should keep all definitions in kexec-tools as close as possible to that of corresponding definitions in kernel. This will help us to avoid any confusion in future. ~Pratyush