diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-07-06 23:37:34 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-07-06 23:38:33 -0700 |
commit | 486413fdde630103451f0d697621dfaf83cbf4bf (patch) | |
tree | 25d124b40bbd3a14e826342bb2d249c3b3264759 | |
parent | a62f334c60bc19c581de27bd7b2a865647bcb00f (diff) | |
download | mu-486413fdde630103451f0d697621dfaf83cbf4bf.tar.gz |
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.
-rw-r--r-- | subx/021translate.cc | 5 |
1 files changed, 2 insertions, 3 deletions
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); |