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.
This commit is contained in:
Kartik Agaram 2018-07-06 23:37:34 -07:00
parent a62f334c60
commit 486413fdde
1 changed files with 2 additions and 3 deletions

View File

@ -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);