API for loading and managing ELF files
More...
|
file | elf.h |
| ELF binary loading support.
|
|
|
#define | ELF32_ST_BIND(info) |
| Retrieve the binding type for a symbol.
|
|
#define | ELF32_ST_TYPE(info) |
| Retrieve the symbol type for a symbol.
|
|
#define | ELF32_R_SYM(i) |
| Retrieve the symbol index from a relocation entry.
|
|
#define | ELF32_R_TYPE(i) |
| Retrieve the relocation type from a relocation entry.
|
|
API for loading and managing ELF files
◆ ELF32_R_SYM
Value:
Retrieve the symbol index from a relocation entry.
- Parameters
-
- Returns
- The symbol table index from that relocation entry.
◆ ELF32_R_TYPE
#define ELF32_R_TYPE |
( |
| i | ) |
|
Value:
unsigned char uint8
8-bit unsigned integer
Definition types.h:35
Retrieve the relocation type from a relocation entry.
- Parameters
-
- Returns
- The relocation type of that relocation.
- See also
- Relocation Types
◆ ELF32_ST_BIND
#define ELF32_ST_BIND |
( |
| info | ) |
|
Value:
Retrieve the binding type for a symbol.
- Parameters
-
- Returns
- The binding type of the symbol.
- See also
- Symbol Binding Types
◆ ELF32_ST_TYPE
#define ELF32_ST_TYPE |
( |
| info | ) |
|
Value:
Retrieve the symbol type for a symbol.
- Parameters
-
- Returns
- The symbol type of the symbol.
- See also
- Symbol Types
◆ elf_free()
Free a loaded ELF program.
This function cleans up an ELF binary that was loaded with elf_load().
- Parameters
-
prog | The loaded binary to clean up. |
◆ elf_load()
int elf_load |
( |
const char * | fn, |
|
|
struct klibrary * | shell, |
|
|
elf_prog_t * | out ) |
Load an ELF binary.
This function loads an ELF binary from the VFS and fills in an elf_prog_t for it.
- Parameters
-
fn | The filename of the binary on the VFS. |
shell | Unused? |
out | Storage for the binary that will be loaded. |
- Returns
- 0 on success, <0 on failure.