diff options
author | Karel Kočí <cynerd@email.cz> | 2018-01-15 15:22:44 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2018-01-15 15:22:44 +0100 |
commit | d7d9860051a9a9eb2c6f11684535ac65cce38eb8 (patch) | |
tree | 55976fdbfcac8fd34bb073258c5fc32506c11022 /qtmips_machine/programloader.cpp | |
parent | a8d4f0d2c7ec70f22b1fb4a7614ebd076a2916cd (diff) | |
download | qtmips-d7d9860051a9a9eb2c6f11684535ac65cce38eb8.tar.gz qtmips-d7d9860051a9a9eb2c6f11684535ac65cce38eb8.tar.bz2 qtmips-d7d9860051a9a9eb2c6f11684535ac65cce38eb8.zip |
Cleanup some todos in code
Diffstat (limited to 'qtmips_machine/programloader.cpp')
-rw-r--r-- | qtmips_machine/programloader.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/qtmips_machine/programloader.cpp b/qtmips_machine/programloader.cpp index fd0679d..c83a30f 100644 --- a/qtmips_machine/programloader.cpp +++ b/qtmips_machine/programloader.cpp @@ -36,7 +36,7 @@ ProgramLoader::ProgramLoader(const char *file) { throw QTMIPS_EXCEPTION(Input, "Getting elf class failed", elf_errmsg(-1)); if (elf_class != ELFCLASS32) throw QTMIPS_EXCEPTION(Input, "Only supported architecture is 32bit", ""); - // TODO check endianity! + // TODO We should check in what endianity elf file is coded in // Get number of program sections in elf file if (elf_getphdrnum(this->elf, &this->n_secs)) @@ -46,7 +46,6 @@ ProgramLoader::ProgramLoader(const char *file) { 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++) { - // TODO handle endianity if (phdrs[i].p_type != PT_LOAD) continue; this->map.push_back(i); @@ -58,8 +57,7 @@ ProgramLoader::ProgramLoader(QString file) : ProgramLoader(file.toStdString().c_ ProgramLoader::~ProgramLoader() { // Close elf - // TODO fix (this results to segfault, there is probably somethig passed to it on stack or something) - //elf_end(this->elf); + elf_end(this->elf); // Close file close(this->fd); } |