summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--src/arch/arm/v7/post.c4
-rw-r--r--src/format/elf/helper_arm.c9
-rw-r--r--src/format/elf/symbols.c10
-rw-r--r--src/format/elf/symbols.h6
5 files changed, 21 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 05bee49..68a4cfb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
15-05-06 Cyrille Bagard <nocbos@gmail.com>
+ * src/arch/arm/v7/post.c:
+ Make a last label name look nicer.
+
+ * src/format/elf/helper_arm.c:
+ Typo.
+
+ * src/format/elf/symbols.c:
+ * src/format/elf/symbols.h:
+ Remove some GCC warnings by casting variables or moving definitions.
+
+15-05-06 Cyrille Bagard <nocbos@gmail.com>
+
* src/core/params.c:
* src/core/params.h:
* src/gtkext/gtkbufferview.c:
diff --git a/src/arch/arm/v7/post.c b/src/arch/arm/v7/post.c
index 17dcf62..dce9c86 100644
--- a/src/arch/arm/v7/post.c
+++ b/src/arch/arm/v7/post.c
@@ -280,8 +280,8 @@ void post_process_ldr_instructions(GArchInstruction *instr, GArchProcessor *proc
init_vmpa(&target, VMPA_NO_PHYSICAL, addr);
init_mrange(&trange, &target, 0);
- vmpa2_virt_to_string(&target, MDS_32_BITS, loc, NULL);
- snprintf(name, sizeof(name), "loccc_%s", loc + 2);
+ vmpa2_virt_to_string(&target, MDS_UNDEFINED, loc, NULL);
+ snprintf(name, sizeof(name), "loc_%s", loc + 2);
routine = g_binary_routine_new();
g_binary_routine_set_name(routine, strdup(name));
diff --git a/src/format/elf/helper_arm.c b/src/format/elf/helper_arm.c
index e44222f..efc8a3d 100644
--- a/src/format/elf/helper_arm.c
+++ b/src/format/elf/helper_arm.c
@@ -26,19 +26,10 @@
#include "elf-int.h"
#include "symbols.h"
-
-
-
-
-
#include "../mangling/demangler.h"
-/* symbols.c : Récupère la désignation d'un symbole donné. */
-//extern const char *get_elf_symbol_name(GElfFormat *, const elf_shdr *, const elf_shdr *, off_t);
-
-
diff --git a/src/format/elf/symbols.c b/src/format/elf/symbols.c
index 4c1811f..04ba3de 100644
--- a/src/format/elf/symbols.c
+++ b/src/format/elf/symbols.c
@@ -57,14 +57,6 @@ static bool load_all_elf_basic_entry_points(GElfFormat *);
-/* Récupère la définition complète d'un symbole donné. */
-bool get_elf_symbol_by_index(GElfFormat *, const elf_shdr *, off_t, elf_sym *);
-
-/* Récupère la désignation d'un symbole donné. */
-const char *get_elf_symbol_name(GElfFormat *, const elf_shdr *, const elf_shdr *, off_t);
-
-
-
@@ -187,7 +179,7 @@ static void register_elf_entry_point(GElfFormat *format, virt_t vaddr, phys_t le
init_vmpa(&addr, VMPA_NO_PHYSICAL, vaddr);
- if (g_binary_format_find_symbol_at(format, &addr, &symbol))
+ if (g_binary_format_find_symbol_at(G_BIN_FORMAT(format), &addr, &symbol))
{
g_object_unref(G_OBJECT(routine));
diff --git a/src/format/elf/symbols.h b/src/format/elf/symbols.h
index 634158d..086cb0d 100644
--- a/src/format/elf/symbols.h
+++ b/src/format/elf/symbols.h
@@ -37,6 +37,12 @@ bool get_elf_symbol_by_index(GElfFormat *, const elf_shdr *, off_t, elf_sym *);
/* Récupère la désignation d'un symbole donné. */
const char *get_elf_symbol_name(GElfFormat *, const elf_shdr *, const elf_shdr *, off_t);
+/* Récupère la définition complète d'un symbole donné. */
+bool get_elf_symbol_by_index(GElfFormat *, const elf_shdr *, off_t, elf_sym *);
+
+/* Récupère la désignation d'un symbole donné. */
+const char *get_elf_symbol_name(GElfFormat *, const elf_shdr *, const elf_shdr *, off_t);
+
#endif /* _FORMAT_ELF_SYMBOLS_H */