diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2009-06-14 21:04:54 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2009-06-14 21:04:54 (GMT) |
commit | 1399ca35405f64fe5be71c8aa4723c759873b992 (patch) | |
tree | 006c7d2ace62eb7c02b956d85138ae1e36078f02 /src/format | |
parent | ae0135d727fdc67a268ede1530042a42a2a1ccd3 (diff) |
Stored the size of the routines (x86 only).
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@77 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format')
-rw-r--r-- | src/format/elf/e_elf.c | 1 | ||||
-rw-r--r-- | src/format/elf/elf-int.h | 1 | ||||
-rw-r--r-- | src/format/elf/symbol.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/src/format/elf/e_elf.c b/src/format/elf/e_elf.c index 1de4ac0..e974b51 100644 --- a/src/format/elf/e_elf.c +++ b/src/format/elf/e_elf.c @@ -601,6 +601,7 @@ GBinRoutine **get_all_elf_routines(const elf_format *format, size_t *count) result[i] = g_binary_routine_new(); g_binary_routine_set_address(result[i], format->symbols[i].address); + g_binary_routine_set_size(result[i], format->symbols[i].size); g_binary_routine_set_name(result[i], strdup(format->symbols[i].name)); } diff --git a/src/format/elf/elf-int.h b/src/format/elf/elf-int.h index dd8909d..65fc922 100644 --- a/src/format/elf/elf-int.h +++ b/src/format/elf/elf-int.h @@ -48,6 +48,7 @@ typedef struct _elf_symbol { const char *name; /* Désignation du symbole */ uint64_t address; /* Adresse du symbole */ + off_t size; /* Taille du code associé */ } elf_symbol; diff --git a/src/format/elf/symbol.c b/src/format/elf/symbol.c index eaf11a4..35dd50f 100644 --- a/src/format/elf/symbol.c +++ b/src/format/elf/symbol.c @@ -297,6 +297,7 @@ bool load_elf_symbol_table_32(elf_format *format, const off_t *sym_start, const format->symbols[format->sym_count - 1].name = &EXE_FORMAT(format)->content[*str_start + symbol.st_name]; format->symbols[format->sym_count - 1].address = symbol.st_value; + format->symbols[format->sym_count - 1].address = symbol.st_size; } |