clang-format on most of kernel/

This commit is contained in:
Ben Vanik
2014-08-17 13:13:03 -07:00
parent 854bcdb60a
commit 1c4dcd5e0e
76 changed files with 2075 additions and 3169 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -13,51 +13,47 @@
#include <xenia/core.h>
#include <xenia/kernel/util/xex2_info.h>
typedef struct {
int reserved;
} xe_xex2_options_t;
typedef struct { int reserved; } xe_xex2_options_t;
struct xe_xex2;
typedef struct xe_xex2* xe_xex2_ref;
typedef struct {
uint32_t ordinal;
uint32_t value_address; // address to place value
uint32_t thunk_address; // NULL or address of thunk
uint32_t value_address; // address to place value
uint32_t thunk_address; // NULL or address of thunk
} xe_xex2_import_info_t;
enum xe_pe_section_flags_e {
kXEPESectionContainsCode = 0x00000020,
kXEPESectionContainsDataInit = 0x00000040,
kXEPESectionContainsDataUninit = 0x00000080,
kXEPESectionMemoryExecute = 0x20000000,
kXEPESectionMemoryRead = 0x40000000,
kXEPESectionMemoryWrite = 0x80000000,
kXEPESectionContainsCode = 0x00000020,
kXEPESectionContainsDataInit = 0x00000040,
kXEPESectionContainsDataUninit = 0x00000080,
kXEPESectionMemoryExecute = 0x20000000,
kXEPESectionMemoryRead = 0x40000000,
kXEPESectionMemoryWrite = 0x80000000,
};
class PESection {
public:
char name[9]; // 8 + 1 for \0
uint32_t raw_address;
uint32_t raw_size;
uint32_t address;
uint32_t size;
uint32_t flags; // kXEPESection*
public:
char name[9]; // 8 + 1 for \0
uint32_t raw_address;
uint32_t raw_size;
uint32_t address;
uint32_t size;
uint32_t flags; // kXEPESection*
};
xe_xex2_ref xe_xex2_load(xe::Memory* memory,
const void* addr, const size_t length,
xe_xex2_options_t options);
xe_xex2_ref xe_xex2_load(xe::Memory* memory, const void* addr,
const size_t length, xe_xex2_options_t options);
xe_xex2_ref xe_xex2_retain(xe_xex2_ref xex);
void xe_xex2_release(xe_xex2_ref xex);
const xe_xex2_header_t *xe_xex2_get_header(xe_xex2_ref xex);
const xe_xex2_header_t* xe_xex2_get_header(xe_xex2_ref xex);
const PESection* xe_xex2_get_pe_section(xe_xex2_ref xex, const char* name);
int xe_xex2_get_import_infos(xe_xex2_ref xex,
const xe_xex2_import_library_t *library,
xe_xex2_import_info_t **out_import_infos,
size_t *out_import_info_count);
const xe_xex2_import_library_t* library,
xe_xex2_import_info_t** out_import_infos,
size_t* out_import_info_count);
#endif // XENIA_KERNEL_UTIL_XEX2_H_

View File

@@ -12,7 +12,6 @@
#include <xenia/common.h>
typedef enum {
XEX_HEADER_RESOURCE_INFO = 0x000002FF,
XEX_HEADER_FILE_FORMAT_INFO = 0x000003FF,
@@ -456,5 +455,4 @@ typedef struct {
xe_xex2_section_t* sections;
} xe_xex2_header_t;
#endif // XENIA_KERNEL_XEX2_INFO_H_