forked from DC-SWAT/DreamShell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcmd_elf.h
More file actions
29 lines (19 loc) · 679 Bytes
/
cmd_elf.h
File metadata and controls
29 lines (19 loc) · 679 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/**
* \file cmd_elf.h
* \brief DreamShell external binary commands
* \date 2007-2014
* \author SWAT www.dc-swat.ru
*/
#include <sys/cdefs.h>
#include <arch/types.h>
/* Kernel-specific definition of a loaded ELF binary */
typedef struct cmd_elf_prog {
void *data; /* Data block containing the program */
uint32 size; /* Memory image size (rounded up to page size) */
/* Elf exports */
ptr_t main;
} cmd_elf_prog_t;
/* Load an ELF binary and return the relevant data in an cmd_elf_prog_t structure. */
cmd_elf_prog_t *cmd_elf_load(const char *fn);
/* Free a loaded ELF program */
void cmd_elf_free(cmd_elf_prog_t *prog);