summaryrefslogtreecommitdiff
path: root/src/format/elf/elf-int.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2014-08-25 21:03:25 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2014-08-25 21:03:25 (GMT)
commit90a79bf4c2c21715e5ef9d8a370928d218c08784 (patch)
tree57afefc5caa098f4c34ac2d382d085f736245990 /src/format/elf/elf-int.c
parentdd51bdbc51abec252ad5169d722a8b6faa53c1ac (diff)
Loaded lots of ELF header information as symbols.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@393 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/elf/elf-int.c')
-rw-r--r--src/format/elf/elf-int.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/format/elf/elf-int.c b/src/format/elf/elf-int.c
index 17aeaf2..677a9ef 100644
--- a/src/format/elf/elf-int.c
+++ b/src/format/elf/elf-int.c
@@ -27,9 +27,6 @@
#include <string.h>
-#include "../../arch/raw.h"
-
-
/******************************************************************************
* *
@@ -52,18 +49,6 @@ bool read_elf_header(GElfFormat *format, elf_header *header, bool *is_32b, Sourc
const bin_t *content; /* Contenu binaire à lire */
off_t length; /* Taille totale du contenu */
off_t pos; /* Position de lecture */
- GArchInstruction *instr; /* Instruction décodée */
-
-
- vmpa2t *pos2;
-
-
- GBinSymbol *symbol;
-
- size_t i; /* Boucle de parcours */
- GArchOperand *operand; /* Opérande à venir modifier */
-
-
content = G_BIN_FORMAT(format)->content;
length = G_BIN_FORMAT(format)->length;
@@ -108,37 +93,6 @@ bool read_elf_header(GElfFormat *format, elf_header *header, bool *is_32b, Sourc
break;
}
-
- pos2 = make_vmpa(0, 0x123);
-
-
-
- instr = g_raw_instruction_new_array(content, MDS_8_BITS, 4, pos2, 4, *endian);
-
-
- for (i = 1; i < 4; i++)
- {
- operand = g_arch_instruction_get_operand(instr, i);
- g_imm_operand_set_display(G_IMM_OPERAND(operand), IOD_CHAR);
- }
-
-
-
-
- symbol = g_binary_symbol_new(STP_OBJECT, "toto", 0);
-
- printf("TOTO\n");
-
- g_binary_symbol_attach_instruction(symbol, instr);
- g_binary_format_add_symbol(format, symbol);
-
-
-
-
-
-
-
-
if (*is_32b)
{
result &= read_u16(&header->hdr32.e_type, content, &pos, length, *endian);