diff options
author | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-02-04 22:04:37 +0100 |
---|---|---|
committer | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-02-04 22:04:37 +0100 |
commit | 54e20dad0f8efe01152d00fe41bf6aa2c44f5bba (patch) | |
tree | 67eed46fe364da8e947c03b870c6fa452edfce51 /qtmips_machine/programloader.h | |
parent | 8c7a41702faf6760c74382ae269f0bf4603a0abe (diff) | |
download | qtmips-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.h | 2 |
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; }; } |