diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-07-10 07:18:36 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-07-10 07:18:36 -0700 |
commit | 1f4d0aaf08c117a0d6b56afd776066c336522f8b (patch) | |
tree | 61d1fa2e8d72b9837b50e71653ab7956232ac12a /subx/020elf.cc | |
parent | 5bb70d5e7fd487fbde5b1d3ca40ee68343fbd898 (diff) | |
download | mu-1f4d0aaf08c117a0d6b56afd776066c336522f8b.tar.gz |
4334
Fix CI.
Diffstat (limited to 'subx/020elf.cc')
-rw-r--r-- | subx/020elf.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/subx/020elf.cc b/subx/020elf.cc index 18b52634..21d0d6bf 100644 --- a/subx/020elf.cc +++ b/subx/020elf.cc @@ -92,13 +92,19 @@ void load_segment_from_program_header(uint8_t* elf_contents, size_t size, uint32 End_of_program = p_vaddr+p_memsz; } +:(before "End Includes") +// Very primitive/fixed/insecure ELF segments for now. +// code: 0x08048000 -> 0x08048fff +// data: 0x08049000 -> 0x08049fff +// heap: 0x0804a000 -> 0x0804afff +// stack: 0x0804bfff -> 0x0804b000 (downward) +const int CODE_START = 0x08048000; +const int SEGMENT_SIZE = 0x1000; +const int DATA_START = 0x08049000; +const int AFTER_STACK = 0x0804c000; +:(code) void initialize_mem() { - // Very primitive/fixed/insecure ELF segments for now. - // code: 0x08048000 -> 0x08048fff - // data: 0x08049000 -> 0x08049fff - // heap: 0x0804a000 -> 0x0804afff - // stack: 0x0804bfff -> 0x0804b000 (downward) - Mem.resize(0x0804c000 - 0x08048000); + Mem.resize(AFTER_STACK - CODE_START); } inline uint32_t u32_in(uint8_t* p) { |