5409
Bugfix eleven: segment flags were incorrectly computed. examples/ex1 now verified! Added to CI.
This commit is contained in:
parent
c2a74205d6
commit
4d37fb5213
BIN
subx/apps/survey
BIN
subx/apps/survey
Binary file not shown.
|
@ -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
|
||||
|
|
|
@ -10,6 +10,8 @@ test `uname` = 'Linux' && echo 'testing native runs as well'
|
|||
|
||||
CFLAGS=$CFLAGS ./build
|
||||
|
||||
echo "== translating and running using C++"
|
||||
|
||||
echo ex1
|
||||
./subx translate examples/ex1.subx -o examples/ex1
|
||||
[ "$1" != record ] && git diff --exit-code examples/ex1
|
||||
|
@ -224,4 +226,12 @@ test `uname` = 'Linux' && {
|
|||
echo
|
||||
}
|
||||
|
||||
echo "== translating using SubX"
|
||||
|
||||
echo ex1
|
||||
cat examples/ex1.subx |subx_bin run apps/dquotes |subx_bin run apps/assort |subx_bin run apps/pack |subx_bin run apps/survey |subx_bin run apps/hex |diff examples/ex1 -
|
||||
test `uname` = 'Linux' && {
|
||||
cat examples/ex1.subx |apps/dquotes |apps/assort |apps/pack |apps/survey |apps/hex |diff examples/ex1 -
|
||||
}
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue