aboutsummaryrefslogtreecommitdiffstats
path: root/elf/elf_module.h
diff options
context:
space:
mode:
authorStefan Bucur <stefanb@zytor.com>2008-06-10 18:36:17 +0300
committerStefan Bucur <stefanb@zytor.com>2008-06-10 18:36:17 +0300
commit4e14b7d997d8602ce241f015754104d31ced73de (patch)
tree5e6985661ceb9fc38c86b472ae243134347629f8 /elf/elf_module.h
parente4642a4d0fac67f22e2e63cbcaea915c507e241e (diff)
downloadsyslinux-elf-4e14b7d997d8602ce241f015754104d31ced73de.tar.gz
syslinux-elf-4e14b7d997d8602ce241f015754104d31ced73de.tar.xz
syslinux-elf-4e14b7d997d8602ce241f015754104d31ced73de.zip
Implemented logic for segment loading.
Diffstat (limited to 'elf/elf_module.h')
-rw-r--r--elf/elf_module.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/elf/elf_module.h b/elf/elf_module.h
index fd0e15c5..6074b559 100644
--- a/elf/elf_module.h
+++ b/elf/elf_module.h
@@ -10,6 +10,8 @@
#define MODULE_ELF_CLASS ELFCLASS32
#define MODULE_ELF_DATA ELFDATA2LSB
#define MODULE_ELF_VERSION EV_CURRENT
+#define MODULE_ELF_TYPE ET_DYN
+#define MODULE_ELF_MACHINE EM_386
typedef int (*module_init_func)();
@@ -28,6 +30,10 @@ struct elf_module {
void *file_image; // The image of the module file in memory
uint32_t file_size; // The size of the module file
+ void *module_addr; // The module location in the memory
+ Elf32_Addr base_addr; // The base address of the module
+ Elf32_Word module_size; // The module size in memory
+
// Information for modules loaded in user space
#ifdef ELF_USERSPACE_TEST
int file_fd; // The file descriptor of the open file