summaryrefslogtreecommitdiff
path: root/src/format/elf
diff options
context:
space:
mode:
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;
}