diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-05-09 09:25:01 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-05-09 09:25:01 -0700 |
commit | fbc21293299f1d5b2d108e3ee98ea4e9083965b5 (patch) | |
tree | 31c5b683cbdeee9e4b32f402a3ec3b76e769aafa /subx/012elf.cc | |
parent | 3ae1fd0048cb0745f570df0263a828a30315a00b (diff) | |
download | mu-fbc21293299f1d5b2d108e3ee98ea4e9083965b5.tar.gz |
5148
Snapshot of incomplete work to have the memory allocator use `mmap` rather than `brk`. C tests pass, but the SubX layers are still broken.
Diffstat (limited to 'subx/012elf.cc')
-rw-r--r-- | subx/012elf.cc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/subx/012elf.cc b/subx/012elf.cc index 0f058504..6a31826e 100644 --- a/subx/012elf.cc +++ b/subx/012elf.cc @@ -129,15 +129,13 @@ void load_segment_from_program_header(uint8_t* elf_contents, int segment_index, } :(before "End Includes") -// Very primitive/fixed/insecure ELF segments for now: just consecutive VMAs. -// code: 0x09000000 -> 0x09ffffff -// data/heap: 0x0a000000 -> 0x0affffff -// stack: 0x0b000ffc -> 0x0b000000 (downward) -const int CODE_SEGMENT = 0x09000000; -const int DATA_SEGMENT = 0x0a000000; // keep sync'd with `Heap.limit` in allocate.subx -const int STACK_SEGMENT = 0x0b000000; -const int AFTER_STACK = 0x0c000000; -const int ARGV_DATA_SEGMENT = 0x0c000000; +// Very primitive/fixed/insecure ELF segments for now. +// code: 0x09000000 -> 0x09ffffff +// stack: 0xbe000000 -> 0xb0000000 (downward) +const int CODE_SEGMENT = 0x09000000; +const int STACK_SEGMENT = 0xb0000000; +const int AFTER_STACK = 0xbe000000; +const int ARGV_DATA_SEGMENT = 0xbf000000; :(before "End Dump Info for Instruction") //? dump_stack(); // slow :(code) |