From 486413fdde630103451f0d697621dfaf83cbf4bf Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Fri, 6 Jul 2018 23:37:34 -0700 Subject: 4318 Simpler. Now it's clear that what commit 4291 got wrong was an alignment-violating address for both the entrypoint and the start of the segment. --- subx/021translate.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'subx/021translate.cc') diff --git a/subx/021translate.cc b/subx/021translate.cc index 354eaf0a..b8e5159a 100644 --- a/subx/021translate.cc +++ b/subx/021translate.cc @@ -103,10 +103,9 @@ void dump_elf_header(ostream& out) { uint32_t p_offset = /*size of ehdr*/52 + /*size of phdr*/32; emit(p_offset); // p_vaddr - uint32_t addr = START+p_offset; - emit(addr); + emit(e_entry); // p_paddr - emit(addr); + emit(e_entry); // p_filesz uint32_t size = End_of_program - /*we're not using location 0*/1; emit(size); -- cgit 1.4.1-2-gfad0