aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/sys/module/elf_module.c
diff options
context:
space:
mode:
authorStefan Bucur <stefan@stefan-mac.(none)>2009-07-04 19:47:29 +0300
committerStefan Bucur <stefan@stefan-mac.(none)>2009-07-04 19:47:29 +0300
commit2ab2c16e359d266719ce8639ca0fa057d0f7a099 (patch)
treea3907756a1b2ed01e630ddbf114929d72ebd2631 /com32/lib/sys/module/elf_module.c
parentc9d910a68845661946d1e040faaa4f46076fd64f (diff)
downloadsyslinux-elf-2ab2c16e359d266719ce8639ca0fa057d0f7a099.tar.gz
syslinux-elf-2ab2c16e359d266719ce8639ca0fa057d0f7a099.tar.xz
syslinux-elf-2ab2c16e359d266719ce8639ca0fa057d0f7a099.zip
Added support in shallow modules to offset symbols.
The symbol values can be offset so that they could match a memory region, in case it is created dynamically and the symbol table does not include the offsets.
Diffstat (limited to 'com32/lib/sys/module/elf_module.c')
-rw-r--r--com32/lib/sys/module/elf_module.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/com32/lib/sys/module/elf_module.c b/com32/lib/sys/module/elf_module.c
index 4b1f2bbd..99b0c17b 100644
--- a/com32/lib/sys/module/elf_module.c
+++ b/com32/lib/sys/module/elf_module.c
@@ -417,6 +417,7 @@ static int extract_operations(struct elf_module *module) {
module->main_func = NULL;
}
+
return 0;
}
@@ -468,8 +469,11 @@ int module_load(struct elf_module *module) {
// The file image is no longer needed
image_unload(module);
- DBG_PRINT("MODULE %s LOADED SUCCESSFULLY (init@0x%08X, exit@0x%08X)\n",
- module->name, *(module->init_func), *(module->exit_func));
+ DBG_PRINT("MODULE %s LOADED SUCCESSFULLY (main@0x%08X, init@0x%08X, exit@0x%08X)\n",
+ module->name,
+ (module->main_func == NULL) ? NULL : *(module->main_func),
+ (module->init_func == NULL) ? NULL : *(module->init_func),
+ (module->exit_func == NULL) ? NULL : *(module->exit_func));
return 0;