summaryrefslogtreecommitdiff
path: root/src/format/elf
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2009-05-31 20:58:20 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2009-05-31 20:58:20 (GMT)
commit8724afdc73e0ddad86f46de1a3fbe0254575a76e (patch)
treede666b66e154c6c6453807d3fa4272efb6877a91 /src/format/elf
parent0b7d7f26c745ff0f52e9e483a0980351368ca824 (diff)
Supported a new architecture (MIPS).
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@67 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/elf')
-rw-r--r--src/format/elf/e_elf.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/format/elf/e_elf.c b/src/format/elf/e_elf.c
index dac0cd7..b5e3406 100644
--- a/src/format/elf/e_elf.c
+++ b/src/format/elf/e_elf.c
@@ -242,7 +242,25 @@ elf_format *load_elf(const uint8_t *content, off_t length)
FormatTargetMachine get_elf_target_machine(const elf_format *format)
{
- return FTM_386;
+ FormatTargetMachine result; /* Identifiant à retourner */
+
+ switch (format->header.e_machine)
+ {
+ case EM_MIPS:
+ result = FTM_MIPS;
+ break;
+
+ case EM_386:
+ result = FTM_386;
+ break;
+
+ default:
+ /* FIXME */
+ break;
+
+ }
+
+ return result;
}