summaryrefslogtreecommitdiff
path: root/src/format/elf
diff options
context:
space:
mode:
Diffstat (limited to 'src/format/elf')
-rw-r--r--src/format/elf/helper_arm.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/format/elf/helper_arm.c b/src/format/elf/helper_arm.c
index f47df5d..f966296 100644
--- a/src/format/elf/helper_arm.c
+++ b/src/format/elf/helper_arm.c
@@ -118,30 +118,22 @@ bool load_elf_arm_relocated_symbols(GElfFormat *format, const elf_shdr *relxxx,
symbol = g_binary_symbol_new(STP_ROUTINE);
g_binary_symbol_attach_routine(symbol, routine);
- g_binary_format_add_symbol(G_BIN_FORMAT(format), symbol);
/* Comptabilisation pour le désassemblage brut */
g_binary_format_register_code_point(G_BIN_FORMAT(format), virt, false);
-
- /*
- printf("got a jump ! >> %d - %s\n", index, name);
- printf(" -->> val = 0x%08lx\n", ELF_SYM(format, sym, st_value));
- printf(" -->> 0x%08lx =>> 0x%08lx\n", (unsigned int)ELF_REL(format, reloc, r_offset),
- ((unsigned int)ELF_SHDR(format, (*relxxx), sh_addr) + ELF_REL(format, reloc, r_offset)));
- */
-
- //symbol = g_binary_symbol_new(STP_FUNCTION));
- //g_binary_format_add_symbol(G_BIN_FORMAT(format), symbol);
-
break;
default:
printf("Relocation not supported (%lld) !\n", ELF_REL_TYPE(format, reloc));
+ symbol = NULL;
break;
}
+ if (symbol != NULL)
+ _g_binary_format_add_symbol(G_BIN_FORMAT(format), symbol, false);
+
}
return result;