From 4d37fb52137ac795eeb1214c5b607b1e257721f0 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Wed, 17 Jul 2019 00:23:07 -0700 Subject: 5409 Bugfix eleven: segment flags were incorrectly computed. examples/ex1 now verified! Added to CI. --- subx/apps/survey | Bin 41172 -> 41174 bytes subx/apps/survey.subx | 10 ++++++---- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'subx/apps') diff --git a/subx/apps/survey b/subx/apps/survey index ea50364a..6971e511 100755 Binary files a/subx/apps/survey and b/subx/apps/survey differ diff --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 -- cgit 1.4.1-2-gfad0