GRUB Elf64 Symbol Table

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
dschatz
Member
Member
Posts: 61
Joined: Wed Nov 10, 2010 10:55 pm

GRUB Elf64 Symbol Table

Post by dschatz »

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?
dschatz
Member
Member
Posts: 61
Joined: Wed Nov 10, 2010 10:55 pm

Re: GRUB Elf64 Symbol Table

Post by dschatz »

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?
Post Reply