summaryrefslogtreecommitdiff
path: root/src/analysis/disass
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-01-25 01:12:54 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-01-25 01:12:54 (GMT)
commit0993276d6450919c6d178182c5fd26497b62d5fc (patch)
tree5b069eb20ce7360ef6c8d4d55b8a0ab000eb70c2 /src/analysis/disass
parent141d2f0fbb2ce3b4ddf85383c55b891fd59dc598 (diff)
Added a fixed address for the start of the '.plt' section and improved the disassembly process.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@460 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/disass')
-rw-r--r--src/analysis/disass/area.c2
-rw-r--r--src/analysis/disass/fetch.c2
-rw-r--r--src/analysis/disass/output.c10
3 files changed, 13 insertions, 1 deletions
diff --git a/src/analysis/disass/area.c b/src/analysis/disass/area.c
index 7e3a9a8..8340095 100644
--- a/src/analysis/disass/area.c
+++ b/src/analysis/disass/area.c
@@ -648,7 +648,7 @@ static void fill_mem_area(mem_area *area, mem_area *list, size_t count, const GL
copy_vmpa(&start, get_mrange_addr(&area->range));
advance_vmpa(&start, i);
- if (area->exec && get_virt_addr(&start) % 4 == 0)
+ if (area->exec && get_virt_addr(&start) % 2 == 0)
{
load_code_from_mem_area(area, list, count, binary, ctx, &start, info);
diff --git a/src/analysis/disass/fetch.c b/src/analysis/disass/fetch.c
index ffc653a..38ea8c0 100644
--- a/src/analysis/disass/fetch.c
+++ b/src/analysis/disass/fetch.c
@@ -140,6 +140,8 @@ GArchInstruction *disassemble_binary_content(const GLoadedBinary *binary, GtkExt
virt = g_binary_format_get_entry_point(format);
+ follow_execution_flow(binary, ctx, areas, count, info, 0x84d0);
+
follow_execution_flow(binary, ctx, areas, count, info, 0x84c5);
follow_execution_flow(binary, ctx, areas, count, info, 0x8a65);
diff --git a/src/analysis/disass/output.c b/src/analysis/disass/output.c
index eb53206..87d0407 100644
--- a/src/analysis/disass/output.c
+++ b/src/analysis/disass/output.c
@@ -177,6 +177,16 @@ void print_disassembled_instructions(GCodeBuffer *buffer, const GExeFormat *form
iaddr = get_mrange_addr(g_arch_instruction_get_range(iter));
saddr = get_mrange_addr(g_binary_symbol_get_range(symbols[sym_index]));
+
+ printf("OUTPUT [%zu] :: 0x%08x - 0x%08x :: 0x%08x - 0x%08x '%s'\n",
+ sym_index,
+ (unsigned int)get_phy_addr(iaddr),
+ (unsigned int)get_virt_addr(iaddr),
+ (unsigned int)get_phy_addr(saddr),
+ (unsigned int)get_virt_addr(saddr),
+ g_binary_symbol_to_string(symbols[sym_index]));
+
+
if (cmp_vmpa_by_virt(iaddr, saddr) == 0)
{
/* Etiquette ? */