I want to print symbol of .o file (same of nm command). I iterate on each section. And use this condition:
if (section[i].sh_type == SHT_SYMTAB)
{
sym = (Elf64_Sym *)((char *)content +
section[i].sh_offset);
}
When I have my Elf64_Sym struct, i want print the symbol name. The struct is:
typedef struct {
uint32_t st_name;
unsigned char st_info;
unsigned char st_other;
uint16_t st_shndx;
Elf64_Addr st_value;
uint64_t st_size;
} Elf64_Sym;
How to print the st_name ? His type is uint32_t. I don't understand how to print it.
An idea ? Thanks you !