about summary refs log tree commit diff stats
path: root/subx/021translate.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-07-08 22:57:50 -0700
committerKartik Agaram <vc@akkartik.com>2018-07-08 22:57:50 -0700
commit43b170ea0375e829cf5208a88ab9705aa4be413d (patch)
treefc5273eab927767940643ee4ddad0d403f5e47ad /subx/021translate.cc
parent1e1eca1742ec396e5daa686e6b425dbd11f25baf (diff)
downloadmu-43b170ea0375e829cf5208a88ab9705aa4be413d.tar.gz
4330 - start allocating data/stack/heap segments
ex4 now writes to the (global) data segment, rather than trying to write
to the code segment.

We still need to specify the other segments in the generated ELF,
though.
Diffstat (limited to 'subx/021translate.cc')
-rw-r--r--subx/021translate.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/subx/021translate.cc b/subx/021translate.cc
index 5757805e..c32b8fef 100644
--- a/subx/021translate.cc
+++ b/subx/021translate.cc
@@ -34,7 +34,7 @@ void perform_all_transforms(string& program) {
 // write out the current Memory contents from address 1 to End_of_program to a
 // bare-bones ELF file with a single section/segment and a hard-coded origin address.
 void dump_elf(const string& program, const char* filename) {
-  Mem.resize(1024);
+  initialize_mem();
   // load program into memory, filtering out comments
   load_program(program, 1);  // Not where 'program' should be loaded for running.
                              // But we're not going to run it right now, so we