diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-07-14 10:40:26 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-07-14 10:43:34 -0700 |
commit | aa6c342af977b4638361b2e68c3f8cc6888cac24 (patch) | |
tree | ee7ac032d37796dc5949bd1a9a1a0c747d388428 | |
parent | 6f812e6ea125aadd2e0891b094902b34924dccd0 (diff) | |
download | mu-aa6c342af977b4638361b2e68c3f8cc6888cac24.tar.gz |
4343
Let's minimize the alignment requirements of each segment's offset. It'll make binaries take less room later. Otherwise we may need to pad lots of 0s for segments after the first. Generated ELF binaries continue to work natively (except ex4, but that was already not working).
-rw-r--r-- | subx/021translate.cc | 2 | ||||
-rwxr-xr-x | subx/ex1 | bin | 96 -> 96 bytes | |||
-rwxr-xr-x | subx/ex2 | bin | 102 -> 102 bytes | |||
-rwxr-xr-x | subx/ex3 | bin | 119 -> 119 bytes | |||
-rwxr-xr-x | subx/ex4 | bin | 113 -> 113 bytes |
5 files changed, 1 insertions, 1 deletions
diff --git a/subx/021translate.cc b/subx/021translate.cc index c3d780f1..d33755ab 100644 --- a/subx/021translate.cc +++ b/subx/021translate.cc @@ -114,7 +114,7 @@ void dump_elf_header(ostream& out) { uint32_t p_flags = 0x5; // r-x emit(p_flags); // p_align - uint32_t p_align = 0x1000; + uint32_t p_align = 0x4; // p_offset must be congruent to p_paddr/p_vaddr modulo p_align emit(p_align); #undef O #undef emit diff --git a/subx/ex1 b/subx/ex1 index f3c9730d..c4114dfd 100755 --- a/subx/ex1 +++ b/subx/ex1 Binary files differdiff --git a/subx/ex2 b/subx/ex2 index 3bbd979b..38520d38 100755 --- a/subx/ex2 +++ b/subx/ex2 Binary files differdiff --git a/subx/ex3 b/subx/ex3 index aa209b92..9c1f9a92 100755 --- a/subx/ex3 +++ b/subx/ex3 Binary files differdiff --git a/subx/ex4 b/subx/ex4 index b20490ad..21f7118b 100755 --- a/subx/ex4 +++ b/subx/ex4 Binary files differ |