diff options
author | Stefan Bucur <stefanb@zytor.com> | 2008-06-11 23:45:50 +0300 |
---|---|---|
committer | Stefan Bucur <stefanb@zytor.com> | 2008-06-11 23:45:50 +0300 |
commit | b56dd67e88eaceffd924a495bca3bf8590f2cd7e (patch) | |
tree | 2764fbc418cd61da079b9df3dacbc432ce5e679a /elf/elf_module.h | |
parent | 0faff07bff238831dc4135d3cbb0047b216cb7c3 (diff) | |
download | syslinux-elf-b56dd67e88eaceffd924a495bca3bf8590f2cd7e.tar.gz syslinux-elf-b56dd67e88eaceffd924a495bca3bf8590f2cd7e.tar.xz syslinux-elf-b56dd67e88eaceffd924a495bca3bf8590f2cd7e.zip |
Implemented symbol verification and global searching.
The global searching routine yields priority to the GLOBAL symbols,
and uses WEAK symbols only when GLOBAL symbols are not found.
Diffstat (limited to 'elf/elf_module.h')
-rw-r--r-- | elf/elf_module.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/elf/elf_module.h b/elf/elf_module.h index 8a8d4830..0cd325de 100644 --- a/elf/elf_module.h +++ b/elf/elf_module.h @@ -36,6 +36,7 @@ struct elf_module { Elf32_Word *ghash_table; // The GNU style hash table char *str_table; // The string table void *sym_table; // The symbol table + void *got; // The Global Offset Table Elf32_Word strtable_size; // The size of the string table Elf32_Word syment_size; // The size of a symbol entry @@ -74,5 +75,10 @@ extern int module_load(struct elf_module *module); extern int module_unload(struct elf_module *module); extern Elf32_Sym *module_find_symbol(const char *name, struct elf_module *module); +extern Elf32_Sym *global_find_symbol(const char *name, struct elf_module **module); + +static inline void *module_get_absolute(Elf32_Addr addr, struct elf_module *module) { + return (void*)(module->base_addr + addr); +} #endif /*ELF_MODULE_H_*/ |