- Main Page
- Data Structures
- Files
- Directories

- Search for |

- File List
- Globals

# kmod.c File Reference

`#include <ubixos/types.h>`
`#include <ubixos/kmod.h>`
`#include <ubixos/sched.h>`
`#include <ubixos/elf.h>`
`#include <ubixos/kpanic.h>`
`#include <ubixos/lists.h>`
`#include <ubixos/spinlock.h>`
`#include <lib/kprintf.h>`
`#include <lib/kmalloc.h>`
`#include <vfs/vfs.h>`
`#include <vmm/vmm.h>`
`#include <string.h>`
`#include <assert.h>`

Include dependency graph for kmod.c:

Go to the source code of this file.

## Functions
uInt32 | kmod_add (const char *kmod_file, const char *name)
uInt32 | kmod_load (const char *kmod_file)
## Variables
List_t * | List = 0x0

## Function Documentation

uInt32 kmod_add | ( | const char * | kmod_file,
|  | const char * | name |
| ) |  |  |

Definition at line 46 of file kmod.c.

References CreateItem(), _item_t::data, InitializeList(), InsertItemAtFront(), kmalloc(), kmod_load(), kprintf(), List, and NULL.

Here is the call graph for this function:

uInt32 kmod_load | ( | const char * | kmod_file | ) |

Definition at line 75 of file kmod.c.

References _current, assert, elfHeader::eEntry, ELF32_R_SYM, ELF32_R_TYPE, elfGetRelType(), elfHeader::ePhnum, elfHeader::ePhoff, elfHeader::eShnum, elfHeader::eShoff, elfHeader::eShstrndx, fclose(), fopen(), fread(), fseek(), taskStruct::id, kfree(), kmalloc(), kpanic(), kprintf(), LD_START, memset(), PAGE_DEFAULT, elfProgramHeader::phMemsz, elfProgramHeader::phVaddr, PT_DYNAMIC, PT_GNU_STACK, PT_LOAD, PT_PAX_FLAGS, R_386_32, R_386_PC32, R_386_RELATIVE, elfSectionHeader::shSize, strcmp(), vmm_remapPage(), vmmFindFreePage(), and x1000.

Referenced by kmod_add().

Here is the call graph for this function:

## Variable Documentation

List_t* List = 0x0

Definition at line 44 of file kmod.c.

Referenced by kmod_add().