libk  Diff

Differences From Artifact [d7b4907031]:

To Artifact [b5a70ac75f]:

  • Executable file build.sh — part of check-in [e50a476efe] at 2019-08-22 02:52:20 on branch trunk — removed sneaky segfault in x86-64 syscall fn where %r8 (the register that contains the pointer to the syscall arguments from the C syscall wrapper, which need to be copied into the correct registers before the kernel is invoked) gets overwritten if the syscall valency > 5, because of overlapping ccall and syscall ABI argument registers - r8 is clobbered by argument 5 and any further attempts to use it as a ptr segfault at best. also modified the report function so that it immediate cancels compilation if a sub-process reports failure. changed allocator function signatures so they can return a condition code if the kernel reports an error; updated example code so it compiles and runs without fault. (user: lexi, size: 9203) [annotate] [blame] [check-ins using]

   146    146   		if test ! "$output" -ot "$src"; then
   147    147   			return
   148    148   		fi
   149    149   	fi
   150    150   	if test "$debug" = yes; then
   151    151   		local dflag="-g dwarf2"
   152    152   	fi
   153         -	report $asm $flags $dflag "-f$bin_fmt" -i "$gen" "$src" -o "$output";
          153  +	report $asm $flags $dflag "-f$bin_fmt" -i "$gen" -i "$PWD" "$src" -o "$output";
   154    154   }
   155    155   comp_co()  { comp_c $1 $2 "-c -fPIC"; }
   156    156   comp_c(){
   157    157   	local src=$1
   158    158   	local output=$2
   159    159   	local flags=$3
   160    160   	if test -e "$output"; then