summaryrefslogtreecommitdiff
path: root/utils/imxtools/sbtools/elf.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/imxtools/sbtools/elf.c')
-rw-r--r--utils/imxtools/sbtools/elf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/imxtools/sbtools/elf.c b/utils/imxtools/sbtools/elf.c
index 5d5e1a786c..adf876e5c7 100644
--- a/utils/imxtools/sbtools/elf.c
+++ b/utils/imxtools/sbtools/elf.c
@@ -733,7 +733,10 @@ bool elf_read_file(struct elf_params_t *params, elf_read_fn_t read,
sym->name = strdup(&symstrtab[symdata[j].st_name]);
sym->addr = symdata[j].st_value;
sym->size = symdata[j].st_size;
- sym->section = strdup(&strtab[shdr[symdata[j].st_shndx].sh_name]);
+ if(symdata[j].st_shndx == SHN_ABS)
+ sym->section = NULL;
+ else
+ sym->section = strdup(&strtab[shdr[symdata[j].st_shndx].sh_name]);
switch(type)
{
case STT_FUNC: sym->type = ESYT_FUNC; break;