Commit c0580cef authored by Alejandro Mery's avatar Alejandro Mery
Browse files

bin2fex: cleaned decompile_section loop

parent d62de0d4
...@@ -37,12 +37,16 @@ static int decompile_section(void *bin, size_t bin_size, ...@@ -37,12 +37,16 @@ static int decompile_section(void *bin, size_t bin_size,
struct script_section *section, struct script_section *section,
int out, const char* out_named) int out, const char* out_named)
{ {
int i; struct script_section_entry *entry = PTR(bin, section->offset<<2);
struct script_section_entry *entries = PTR(bin, section->offset<<2); int i = section->length;
for (i=0; i<section->length; i++) { for (; i--; entry++) {
pr_info("%s.%s\t(entry:%d, offset:%d, pattern:0x%05x)\n", unsigned type, length;
section->name, entries[i].name, i, type = (entry->pattern >> 16) & 0xffff;
entries[i].offset, entries[i].pattern); length = (entry->pattern >> 0) & 0xffff;
pr_info("%s.%s\t(offset:%d, type:%d, length:%d)\n",
section->name, entry->name,
entry->offset, type, length);
} }
return 1; /* success */ return 1; /* success */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment