Page 1 of 1
At what offset does grub load the elf file?
Posted: Mon Sep 30, 2019 5:52 pm
by tabz
I would like to read the debug sections from my kernel elf file and therefore need to know at what memory address grub loads the elf file so I can add it to the sections' offset. Is there a way to find out at what address the entire elf file was loaded?
Re: At what offset does grub load the elf file?
Posted: Mon Sep 30, 2019 6:07 pm
by klange
Grub does not load the entire ELF.
You need to make sure your debug sections are marked for loading when you link your ELF and possibly add some symbols around them so you can find out where they are.
Re: At what offset does grub load the elf file?
Posted: Mon Sep 30, 2019 6:19 pm
by tabz
klange wrote:You need to make sure your debug sections are marked for loading when you link your ELF
How would I do so?
klange wrote:and possibly add some symbols around them so you can find out where they are.
I tried that but ran into
this issue.