about summary refs log tree commit diff stats
path: root/subx/apps
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-07-17 00:23:07 -0700
committerKartik Agaram <vc@akkartik.com>2019-07-17 00:29:52 -0700
commit4d37fb52137ac795eeb1214c5b607b1e257721f0 (patch)
tree2de41d68036a6c2f24f3db5bb984dbe9decc7eec /subx/apps
parentc2a74205d690862d4df31682aa5bbe992227fda1 (diff)
downloadmu-4d37fb52137ac795eeb1214c5b607b1e257721f0.tar.gz
5409
Bugfix eleven: segment flags were incorrectly computed. examples/ex1 now
verified! Added to CI.
Diffstat (limited to 'subx/apps')
-rwxr-xr-xsubx/apps/surveybin41172 -> 41174 bytes
-rw-r--r--subx/apps/survey.subx10
2 files changed, 6 insertions, 4 deletions
diff --git a/subx/apps/survey b/subx/apps/survey
index ea50364a..6971e511 100755
--- a/subx/apps/survey
+++ b/subx/apps/survey
Binary files differdiff --git a/subx/apps/survey.subx b/subx/apps/survey.subx
index da01407b..bc96fe14 100644
--- a/subx/apps/survey.subx
+++ b/subx/apps/survey.subx
@@ -2753,11 +2753,13 @@ emit-elf-program-header-entry:  # out : (address buffered-file), curr-segment :
     # . if (EAX == 0) goto next check
     3d/compare-EAX-and  0/imm32
     74/jump-if-equal  $emit-elf-program-header-entry:data/disp8
-    # *Elf_p_flags = rw-
-    c7          0/subop/copy        0/mod/indirect  5/rm32/.disp32            .             .           .           Elf_p_flags/disp32  6/imm32       # copy to *Elf_p_flags
-$emit-elf-program-header-entry:data:
-    # otherwise *Elf_p_flags = r-x
+    # *Elf_p_flags = r-x
     c7          0/subop/copy        0/mod/indirect  5/rm32/.disp32            .             .           .           Elf_p_flags/disp32  5/imm32       # copy to *Elf_p_flags
+    eb/jump  $emit-elf-program-header-entry:really-emit/disp8
+$emit-elf-program-header-entry:data:
+    # otherwise *Elf_p_flags = rw-
+    c7          0/subop/copy        0/mod/indirect  5/rm32/.disp32            .             .           .           Elf_p_flags/disp32  6/imm32       # copy to *Elf_p_flags
+$emit-elf-program-header-entry:really-emit:
     # emit-hex-array(out, Elf_program_header_entry)
     # . . push args
     68/push  Elf_program_header_entry/imm32