RetroArch/console/rgl/ps3/readelf.h

67 lines
1.2 KiB
C
Raw Normal View History

#ifndef READELF_H
#define READELF_H
#include "elf.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _ELF_section_t
{
2012-07-23 12:14:38 +00:00
Elf32_Shdr header;
const char *name;
char *data;
} ELF_section_t;
typedef struct _ELF_segment_t
{
2012-07-23 12:14:38 +00:00
Elf32_Phdr header;
unsigned char *pointer;
unsigned char *data;
} ELF_segment_t;
typedef struct
{
2012-07-23 12:14:38 +00:00
const char *name;
unsigned int vma;
unsigned int size;
int section;
unsigned char resolved;
unsigned char foreign;
} ELF_symbol_t;
typedef struct _ELF_t
{
2012-07-23 12:14:38 +00:00
unsigned int endian;
unsigned int relocatable;
unsigned int sectionCount;
unsigned int segmentCount;
unsigned int symbolCount;
unsigned int entrypoint;
ELF_section_t *sections;
ELF_segment_t *segments;
ELF_symbol_t *symbols;
unsigned int symbolsSection;
unsigned int symbolNamesSection;
unsigned int paramSection;
} ELF_t;
typedef struct
{
2012-07-23 12:14:38 +00:00
unsigned int relative;
unsigned int shift;
unsigned int size;
unsigned int position;
unsigned int mask;
} ELF_rel_type_t;
2012-07-23 12:14:38 +00:00
ELF_section_t *findSection(const ELF_t *elf, const char *name);
int lookupSymbol(const ELF_t *elf, const char *name);
#ifdef __cplusplus
}
#endif
#endif // READELF_H