GRUB Elf64 Symbol Table
GRUB Elf64 Symbol Table
I'm trying to read my kernel's symbol table. I currently build my kernel as an Elf64 and boot it using multiboot in Grub 2. The multiboot information struct gives me a pointer to the ELF section table and also the multiboot specification says the following: "All sections are loaded, and the physical address fields of the elf section header then refer to where the sections are in memory". According to this, the .symtab section should be loaded and the addr field will be set to where I can find it. I parse the section table and see the entry for the .symtab section but the address is 0. In fact, all the fields of the entry are identical to what they were in the original elf. Is there any way to get Grub to load my symbol table and tell me where it is?
Re: GRUB Elf64 Symbol Table
I have been using the grub that comes installed on my Ubuntu 12.04 system - Grub 1.99-21ubuntu3.9. I build grub 2.00 from source and rebuilt my boot image and found that indeed the address fields are filled in as I would expect. It seems there is some bug with the version of grub that comes with my system. Has anyone else run into this problem?