summaryrefslogtreecommitdiff
path: root/src/arch/arm
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-05-16 21:56:55 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-05-16 21:56:55 (GMT)
commit4691a434a34a19317156a761967f719e408b73bb (patch)
tree1daaf5be5d4a9f52d492380c2862580129d2ad12 /src/arch/arm
parent1996274a43883aa58e8c565f7698bc7c338a9ce0 (diff)
Merged routines into symbols.
Diffstat (limited to 'src/arch/arm')
-rw-r--r--src/arch/arm/v7/post.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/arch/arm/v7/post.c b/src/arch/arm/v7/post.c
index 4600700..415b278 100644
--- a/src/arch/arm/v7/post.c
+++ b/src/arch/arm/v7/post.c
@@ -53,7 +53,6 @@ void post_process_ldr_instructions(GArchInstruction *instr, GArchProcessor *proc
mrange_t trange; /* Etendue du symbole à créer */
VMPA_BUFFER(loc); /* Espace pour une conversion */
char name[5 + VMPA_MAX_LEN]; /* Etiquette à constituer */
- GBinRoutine *routine; /* Nouvelle routine trouvée */
GBinSymbol *symbol; /* Nouveau symbole construit */
g_arch_instruction_lock_operands(instr);
@@ -79,14 +78,8 @@ void post_process_ldr_instructions(GArchInstruction *instr, GArchProcessor *proc
vmpa2_virt_to_string(&target, MDS_UNDEFINED, loc, NULL);
snprintf(name, sizeof(name), "loc_%s", loc + 2);
- routine = g_binary_routine_new();
- g_binary_routine_set_name(routine, strdup(name));
- //routine = try_to_demangle_routine(name);
-
- g_binary_routine_set_range(routine, &trange);
-
- symbol = g_binary_symbol_new(STP_CODE_LABEL);
- g_binary_symbol_attach_routine(symbol, routine);
+ symbol = g_binary_symbol_new(&trange, STP_CODE_LABEL);
+ g_binary_symbol_set_alt_label(symbol, name);
g_binary_format_add_symbol(bfmt, symbol);
g_target_operand_resolve(&new, bfmt, true, NULL);