diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-01-29 20:56:31 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-01-29 21:04:47 (GMT) |
commit | 6c51b9eed427fd55ce1457834853386cc8d543cd (patch) | |
tree | 47b8106bdb086278386d05c838178a06cc00f805 /plugins/elf/section.c | |
parent | 8a7d7b3303dee1a381893391c04acab35dec6942 (diff) |
Handled properly imported/exported ELF symbols, as well as all other symbols.
Diffstat (limited to 'plugins/elf/section.c')
-rw-r--r-- | plugins/elf/section.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/elf/section.c b/plugins/elf/section.c index 556c0ed..5e42b0a 100644 --- a/plugins/elf/section.c +++ b/plugins/elf/section.c @@ -195,8 +195,11 @@ bool find_elf_sections_by_type(const GElfFormat *format, uint32_t type, elf_shdr void get_elf_section_content(const GElfFormat *format, const elf_shdr *section, phys_t *offset, phys_t *size, virt_t *addr) { - *offset = ELF_SHDR(format, *section, sh_offset); - *size = ELF_SHDR(format, *section, sh_size); + if (offset != NULL) + *offset = ELF_SHDR(format, *section, sh_offset); + + if (size != NULL) + *size = ELF_SHDR(format, *section, sh_size); if (addr != NULL) *addr = ELF_SHDR(format, *section, sh_addr); |