summaryrefslogtreecommitdiff
path: root/src/format/elf/e_elf.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2008-10-20 23:15:25 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2008-10-20 23:15:25 (GMT)
commitac438e8ad47f267c9eb6f462eb5a7e2b5c017f26 (patch)
tree5d1b350d7dd1f70b58de97e8aa8952cbadecd9ee /src/format/elf/e_elf.c
parent10deb6bbbeeaacfec577f5b24c5f821492af77f3 (diff)
Registered all found strings in binaries.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@36 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/elf/e_elf.c')
-rw-r--r--src/format/elf/e_elf.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/format/elf/e_elf.c b/src/format/elf/e_elf.c
index 03b2e82..c2e49b1 100644
--- a/src/format/elf/e_elf.c
+++ b/src/format/elf/e_elf.c
@@ -30,6 +30,7 @@
#include "elf-int.h"
#include "section.h"
+#include "strings.h"
#include "symbol.h"
@@ -95,6 +96,10 @@ elf_format *load_elf(const uint8_t *content, off_t length)
printf("ok ? %d\n", test);
+ test = find_all_elf_strings(result);
+
+ printf("ok ? %d\n", test);
+
test = load_elf_symbols(result);
printf("ok ? %d\n", test);
@@ -279,6 +284,12 @@ bool resolve_elf_symbol(const elf_format *format, char **label, SymbolType *type
uint64_t best_addr; /* Meilleure adresse trouvée */
size_t i; /* Boucle de parcours */
+ if (resolve_elf_strings(format, label, offset))
+ {
+ *type = STP_STRING;
+ return true;
+ }
+
best_addr = UINT64_MAX;
for (i = 0; i < format->sym_count; i++)