bdk: ianos: restructure for future expansion
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
|
||||
el_status el_pread(el_ctx *ctx, void *def, size_t nb, size_t offset)
|
||||
{
|
||||
return ctx->pread(ctx, def, nb, offset) ? EL_OK : EL_EIO;
|
||||
return ctx->pread(ctx, def, nb, offset);
|
||||
}
|
||||
|
||||
#define EL_PHOFF(ctx, num) (((ctx)->ehdr.e_phoff + (num) *(ctx)->ehdr.e_phentsize))
|
||||
|
||||
@@ -53,7 +53,7 @@ typedef enum
|
||||
|
||||
typedef struct el_ctx
|
||||
{
|
||||
bool (*pread)(struct el_ctx *ctx, void *dest, size_t nb, size_t offset);
|
||||
el_status (*pread)(struct el_ctx *ctx, void *dest, size_t nb, size_t offset);
|
||||
|
||||
/* base_load_* -> address we are actually going to load at
|
||||
*/
|
||||
@@ -61,6 +61,9 @@ typedef struct el_ctx
|
||||
base_load_paddr,
|
||||
base_load_vaddr;
|
||||
|
||||
/* original memory of binary */
|
||||
Elf_Addr eaddr;
|
||||
|
||||
/* size in memory of binary */
|
||||
Elf_Addr memsz;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user