mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Add a some more defines for ELF values.
Mostly flags and stuff.
This commit is contained in:
parent
95d76c6641
commit
33d6ee77cb
2 changed files with 35 additions and 2 deletions
|
@ -529,7 +529,7 @@ int ElfReader::LoadInto(u32 loadAddress)
|
|||
for (int i = 0; i < header->e_phnum; i++)
|
||||
{
|
||||
Elf32_Phdr *p = &segments[i];
|
||||
if (p->p_type == 0x700000A0) {
|
||||
if (p->p_type == PT_PSPREL1) {
|
||||
INFO_LOG(LOADER,"Loading segment relocations");
|
||||
int numRelocs = p->p_filesz / sizeof(Elf32_Rel);
|
||||
|
||||
|
@ -537,7 +537,7 @@ int ElfReader::LoadInto(u32 loadAddress)
|
|||
if (!LoadRelocations(rels, numRelocs)) {
|
||||
ERROR_LOG(LOADER, "LoadInto: Relocs failed, trying anyway (2)");
|
||||
}
|
||||
} else if (p->p_type == 0x700000A1) {
|
||||
} else if (p->p_type == PT_PSPREL2) {
|
||||
INFO_LOG(LOADER,"Loading segment relocations2");
|
||||
LoadRelocations2(i);
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ enum ElfType
|
|||
ET_CORE =4,
|
||||
ET_LOPROC =0xFF00,
|
||||
ET_HIPROC =0xFFFF,
|
||||
ET_PSP_PRX=0xFFA0,
|
||||
};
|
||||
|
||||
// Machine/Architecture
|
||||
|
@ -78,6 +79,34 @@ enum ElfMachine
|
|||
#define ELFDATA2LSB 1
|
||||
#define ELFDATA2MSB 2
|
||||
|
||||
// MIPS-specific header flags.
|
||||
#define EF_MIPS_NOREORDER 0x00000001
|
||||
#define EF_MIPS_PIC 0x00000002
|
||||
#define EF_MIPS_CPIC 0x00000004
|
||||
#define EF_MIPS_XGOT 0x00000008
|
||||
#define EF_MIPS_UCODE 0x00000010
|
||||
#define EF_MIPS_ABI2 0x00000020
|
||||
#define EF_MIPS_DYNAMIC 0x00000040
|
||||
#define EF_MIPS_32BITMODE 0x00000100
|
||||
#define EF_MIPS_ABI_MASK 0x0000f000
|
||||
#define EF_MIPS_ABI_O32 0x00001000
|
||||
#define EF_MIPS_ABI_O64 0x00002000
|
||||
#define E_MIPS_ABI_EABI32 0x00003000
|
||||
#define E_MIPS_ABI_EABI64 0x00004000
|
||||
#define EF_MIPS_MACH_MASK 0x00ff0000
|
||||
#define EF_MIPS_MACH_PSP 0x00a20000
|
||||
#define EF_MIPS_ARCH_MASK 0xf0000000
|
||||
#define EF_MIPS_ARCH_1 0x00000000
|
||||
#define EF_MIPS_ARCH_2 0x10000000
|
||||
#define EF_MIPS_ARCH_3 0x20000000
|
||||
#define EF_MIPS_ARCH_4 0x30000000
|
||||
#define EF_MIPS_ARCH_5 0x40000000
|
||||
#define EF_MIPS_ARCH_32 0x50000000
|
||||
#define EF_MIPS_ARCH_64 0x60000000
|
||||
#define EF_MIPS_ARCH_32R2 0x70000000
|
||||
#define EF_MIPS_ARCH_64R2 0x80000000
|
||||
|
||||
|
||||
|
||||
/////////////////////
|
||||
// Sections constants
|
||||
|
@ -165,6 +194,10 @@ enum ElfSectionFlags
|
|||
#define PT_LOPROC 0x70000000
|
||||
#define PT_HIPROC 0x7FFFFFFF
|
||||
|
||||
// Custom segment types
|
||||
#define PT_PSPREL1 0x700000a0
|
||||
#define PT_PSPREL2 0x700000a1
|
||||
|
||||
// Segment flags
|
||||
#define PF_X 1
|
||||
#define PF_W 2
|
||||
|
|
Loading…
Add table
Reference in a new issue