diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-03-28 01:00:33 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-03-28 01:00:33 (GMT) |
commit | 057cee1c3c109639af8f30e39e00f4884a353f31 (patch) | |
tree | 563972accde653fd562305424cb1983617bc0b4c /src/format/elf/elf.c | |
parent | a6bedf6104ccd7d8050e9d6a58f32c0827e3383c (diff) |
Provided readelf features as an external plugin.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@495 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/elf/elf.c')
-rw-r--r-- | src/format/elf/elf.c | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/src/format/elf/elf.c b/src/format/elf/elf.c index f0c361e..f188734 100644 --- a/src/format/elf/elf.c +++ b/src/format/elf/elf.c @@ -39,6 +39,7 @@ #include "strings.h" #include "symbols.h" #include "../../gui/panels/log.h" +#include "../../plugins/pglist.h" @@ -222,6 +223,8 @@ GBinFormat *g_elf_format_new(GBinContent *content) } + handle_binary_format(PGA_FORMAT_LOADER_LAST, G_BIN_FORMAT(result)); + return G_BIN_FORMAT(result); @@ -308,7 +311,7 @@ static void g_elf_format_refine_portions(const GElfFormat *format, GBinPortion * offset = ELF_HDR(format, format->header, e_phoff) + ELF_HDR(format, format->header, e_phentsize) * i; - if (!read_elf_program_header(format, &offset, &phdr)) + if (!read_elf_program_header(format, offset, &phdr)) continue; p_flags = ELF_PHDR(format, phdr, p_flags); @@ -442,3 +445,41 @@ static bool g_elf_format_translate_offset_into_address(const GElfFormat *format, return result; } + + +/****************************************************************************** +* * +* Paramètres : format = informations chargées à consulter. * +* * +* Description : Présente l'en-tête ELF du format chargé. * +* * +* Retour : Pointeur vers la description principale. * +* * +* Remarques : - * +* * +******************************************************************************/ + +const elf_header *g_elf_format_get_header(const GElfFormat *format) +{ + return &format->header; + +} + + +/****************************************************************************** +* * +* Paramètres : format = informations chargées à consulter. * +* * +* Description : Informe quant au boutisme utilisé. * +* * +* Retour : Indicateur de boutisme. * +* * +* Remarques : - * +* * +******************************************************************************/ + +SourceEndian g_elf_format_get_endianness(const GElfFormat *format) +{ + return format->endian; + +} |