about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-07-16 16:03:57 -0700
committerKartik Agaram <vc@akkartik.com>2018-07-16 16:03:57 -0700
commitff46e6a5e1f53b711653004f3bef349941ce7114 (patch)
treea27c4a5bb90e94399acfff0be4bca745130f20ed
parent0c57224ccff9727fb699994a4c3d5f5c6d6d1881 (diff)
downloadmu-ff46e6a5e1f53b711653004f3bef349941ce7114.tar.gz
4357
-rw-r--r--subx/021translate.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/subx/021translate.cc b/subx/021translate.cc
index 2aa4efaa..94cebc04 100644
--- a/subx/021translate.cc
+++ b/subx/021translate.cc
@@ -101,7 +101,9 @@ void dump_elf_header(ostream& out, const program& p) {
     uint32_t p_flags = (i == 0) ? /*r-x*/0x5 : /*rw-*/0x6;  // convention: only first segment is code
     emit(p_flags);
     // p_align
-    uint32_t p_align = 0x1000;  // smaller alignments may not be respected by the kernel
+    // "The value of the p_align field of each program header in a shared
+    // object file must be a multiple of the system page size." -- http://refspecs.linuxfoundation.org/ELF/zSeries/lzsabi0_zSeries/c2083.html
+    uint32_t p_align = 0x1000;
     emit(p_align);
 
     // prepare for next segment