summaryrefslogtreecommitdiff
path: root/src/arch/arm
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-04-22 21:53:07 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-04-22 21:53:07 (GMT)
commit9c1367eb2e75dfac59f33e851dee8d39542072ac (patch)
treedd999e736e12c47d9d0b90808451d14c6279a85d /src/arch/arm
parenta2979604ebaa3d564908f13e4f9ab345fca0ff28 (diff)
Shared target operands in memory when possible.
Diffstat (limited to 'src/arch/arm')
-rw-r--r--src/arch/arm/v7/post.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/arch/arm/v7/post.c b/src/arch/arm/v7/post.c
index cfdc3be..4600700 100644
--- a/src/arch/arm/v7/post.c
+++ b/src/arch/arm/v7/post.c
@@ -48,7 +48,7 @@ void post_process_ldr_instructions(GArchInstruction *instr, GArchProcessor *proc
GArchOperand *op; /* Opérande numérique en place */
uint32_t addr; /* Adresse visée par le saut */
GBinFormat *bfmt; /* Version basique du format */
- GArchOperand *new; /* Instruction de ciblage */
+ GTargetOperand *new; /* Instruction de ciblage */
vmpa2t target; /* Défination finale précise */
mrange_t trange; /* Etendue du symbole à créer */
VMPA_BUFFER(loc); /* Espace pour une conversion */
@@ -68,9 +68,9 @@ void post_process_ldr_instructions(GArchInstruction *instr, GArchProcessor *proc
{
bfmt = G_BIN_FORMAT(format);
- new = g_target_operand_new(MDS_32_BITS_UNSIGNED, &target);
+ new = G_TARGET_OPERAND(g_target_operand_new(MDS_32_BITS_UNSIGNED, &target));
- if (!g_target_operand_resolve(G_TARGET_OPERAND(new), bfmt, true))
+ if (!g_target_operand_resolve(&new, bfmt, true, NULL))
{
addr &= ~0x1;
@@ -89,11 +89,11 @@ void post_process_ldr_instructions(GArchInstruction *instr, GArchProcessor *proc
g_binary_symbol_attach_routine(symbol, routine);
g_binary_format_add_symbol(bfmt, symbol);
- g_target_operand_resolve(G_TARGET_OPERAND(new), bfmt, true);
+ g_target_operand_resolve(&new, bfmt, true, NULL);
}
- _g_arch_instruction_replace_operand(instr, op, new);
+ _g_arch_instruction_replace_operand(instr, op, G_ARCH_OPERAND(new));
}