diff options
author | Karel Kočí <cynerd@email.cz> | 2018-02-14 13:01:34 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2018-02-14 13:01:34 +0100 |
commit | b416eb2efdc82a1cd9b1b69b7f335750a725f738 (patch) | |
tree | 41d318550888d7ffe63e7cb2950429136d369ff4 | |
parent | 43a4a1454be0918fda17d2cb500e505f72220b0d (diff) | |
download | qtmips-b416eb2efdc82a1cd9b1b69b7f335750a725f738.tar.gz qtmips-b416eb2efdc82a1cd9b1b69b7f335750a725f738.tar.bz2 qtmips-b416eb2efdc82a1cd9b1b69b7f335750a725f738.zip |
Fix program loading
First section was ignored
-rw-r--r-- | qtmips_machine/programloader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qtmips_machine/programloader.cpp b/qtmips_machine/programloader.cpp index c83a30f..f6c2e6d 100644 --- a/qtmips_machine/programloader.cpp +++ b/qtmips_machine/programloader.cpp @@ -45,7 +45,7 @@ ProgramLoader::ProgramLoader(const char *file) { if (!(this->phdrs = elf32_getphdr(this->elf))) throw QTMIPS_EXCEPTION(Input, "Elf program sections get failed", elf_errmsg(-1)); // We want only LOAD sections so we create map of those sections - for (unsigned i = 1; i < this->n_secs; i++) { + for (unsigned i = 0; i < this->n_secs; i++) { if (phdrs[i].p_type != PT_LOAD) continue; this->map.push_back(i); |