diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-05-28 07:14:16 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-05-28 07:14:16 (GMT) |
commit | 5dcc4df15a8d84b214bb3f6f0fcfe30f21cb0972 (patch) | |
tree | 71647bc0f253d95c8a08762eeaf2ffa01e2de025 /plugins/elf | |
parent | eef3392134b489fbff7c96046581c987ff7192bd (diff) |
Saved the first steps for a new loading process.
Diffstat (limited to 'plugins/elf')
-rw-r--r-- | plugins/elf/format.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/elf/format.c b/plugins/elf/format.c index 75b9a6c..9cf48ce 100644 --- a/plugins/elf/format.c +++ b/plugins/elf/format.c @@ -255,6 +255,12 @@ GExeFormat *g_elf_format_new(GBinContent *content) g_known_format_set_content(G_KNOWN_FORMAT(result), content); + if (!read_elf_header(result, &result->header, &result->is_32b, &result->endian)) + { + g_object_unref(G_OBJECT(result)); + return NULL; + } + return G_EXE_FORMAT(result); } @@ -331,9 +337,6 @@ static bool g_elf_format_analyze(GElfFormat *format, wgroup_id_t gid, GtkStatusS base = G_BIN_FORMAT(format); exe = G_EXE_FORMAT(format); - if (!read_elf_header(format, &format->header, &format->is_32b, &format->endian)) - goto error; - /* Vérification des tailles d'entrée de table */ if (ELF_HDR(format, format->header, e_phentsize) != ELF_SIZEOF_PHDR(format)) |