From 1bda6c517d30d873ff0d92a96380946ef944c9ae Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Wed, 6 May 2015 20:53:52 +0000 Subject: Removed some GCC warnings by casting variables or moving definitions. git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@532 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a --- ChangeLog | 12 ++++++++++++ src/arch/arm/v7/post.c | 4 ++-- src/format/elf/helper_arm.c | 9 --------- src/format/elf/symbols.c | 10 +--------- src/format/elf/symbols.h | 6 ++++++ 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 + * 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 + * 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 */ -- cgit v0.11.2-87-g4458