aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-02-14 13:01:34 +0100
committerKarel Kočí <cynerd@email.cz>2018-02-14 13:01:34 +0100
commitb416eb2efdc82a1cd9b1b69b7f335750a725f738 (patch)
tree41d318550888d7ffe63e7cb2950429136d369ff4 /qtmips_machine
parent43a4a1454be0918fda17d2cb500e505f72220b0d (diff)
downloadqtmips-b416eb2efdc82a1cd9b1b69b7f335750a725f738.tar.gz
qtmips-b416eb2efdc82a1cd9b1b69b7f335750a725f738.tar.bz2
qtmips-b416eb2efdc82a1cd9b1b69b7f335750a725f738.zip
Fix program loading
First section was ignored
Diffstat (limited to 'qtmips_machine')
-rw-r--r--qtmips_machine/programloader.cpp2
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);