about summary refs log tree commit diff stats
path: root/subx/028translate.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-11-23 00:21:41 -0800
committerKartik Agaram <vc@akkartik.com>2018-11-23 00:22:24 -0800
commit4a99a6e0dd3000d8e595ec7b4b04f637e66ded6d (patch)
treeb6d0b7f2145e4370c22fd0142950e648b406b524 /subx/028translate.cc
parent6ee77ba7bb47bc4b17df67d2683bdbb84f326e8e (diff)
downloadmu-4a99a6e0dd3000d8e595ec7b4b04f637e66ded6d.tar.gz
4761
Bugfix: I forgot about ELF segment offsets when implementing VMAs. Eventually
segments grew large enough that I started seeing overlaps.
Diffstat (limited to 'subx/028translate.cc')
-rw-r--r--subx/028translate.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/subx/028translate.cc b/subx/028translate.cc
index 48c11786..2104d57b 100644
--- a/subx/028translate.cc
+++ b/subx/028translate.cc
@@ -139,7 +139,7 @@ void write_elf_header(ostream& out, const program& p) {
     emit(p_start);
     // p_filesz
     uint32_t size = num_words(p.segments.at(i));
-    assert(p_offset + size < INITIAL_SEGMENT_SIZE);
+    assert(p_offset + size < SEGMENT_ALIGNMENT);
     emit(size);
     // p_memsz
     emit(size);