aboutsummaryrefslogtreecommitdiffstats
path: root/emulator/qtools/read_elf.h
blob: 72266c3fbef9e0a35d94b54d01c45240c09ce411 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef READ_ELF_H
#define READ_ELF_H

#include <stdio.h>
#include <elf.h>

Elf32_Ehdr *ReadElfHeader(FILE *fobj);
Elf32_Shdr *ReadSectionHeaders(Elf32_Ehdr *hdr, FILE *fobj);
char *ReadStringTable(Elf32_Ehdr *hdr, Elf32_Shdr *shdr, FILE *fobj);
Elf32_Shdr *FindSymbolTableSection(Elf32_Ehdr *hdr,
                                   Elf32_Shdr *shdr,
                                   char *string_table);
Elf32_Shdr *FindSymbolStringTableSection(Elf32_Ehdr *hdr,
                                         Elf32_Shdr *shdr,
                                         char *string_table);
int ReadSection(Elf32_Shdr *shdr, void *buffer, FILE *f);
void AdjustElfSymbols(Elf32_Ehdr *hdr, Elf32_Sym *elf_symbols,
                      int num_entries);

#endif /* READ_ELF_H */