aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/programloader.h
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-04 22:04:37 +0100
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-04 22:04:37 +0100
commit54e20dad0f8efe01152d00fe41bf6aa2c44f5bba (patch)
tree67eed46fe364da8e947c03b870c6fa452edfce51 /qtmips_machine/programloader.h
parent8c7a41702faf6760c74382ae269f0bf4603a0abe (diff)
downloadqtmips-54e20dad0f8efe01152d00fe41bf6aa2c44f5bba.tar.gz
qtmips-54e20dad0f8efe01152d00fe41bf6aa2c44f5bba.tar.bz2
qtmips-54e20dad0f8efe01152d00fe41bf6aa2c44f5bba.zip
Setup initial PC according executable entry form ELF file if it is non zero.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_machine/programloader.h')
-rw-r--r--qtmips_machine/programloader.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/qtmips_machine/programloader.h b/qtmips_machine/programloader.h
index 686f64c..607bdb0 100644
--- a/qtmips_machine/programloader.h
+++ b/qtmips_machine/programloader.h
@@ -54,6 +54,7 @@ public:
void to_memory(Memory *mem); // Writes all loaded sections to memory
std::uint32_t end(); // Return address after which there is no more code for sure
+ std::uint32_t get_executable_entry();
private:
int fd;
Elf *elf;
@@ -61,6 +62,7 @@ private:
size_t n_secs; // number of sections in elf program header
Elf32_Phdr *phdrs; // program section headers
QVector<size_t> map; // external index to phdrs index
+ std::uint32_t executable_entry;
};
}