wok diff linld/stuff/src/pipehole.awk @ rev 23999

syslinux/iso2exe: read isolinux.cfg
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Jan 12 07:47:12 2021 +0000 (2021-01-12)
parents a946c1651082
children bc4b94310a29
line diff
     1.1 --- a/linld/stuff/src/pipehole.awk	Fri Jan 08 20:15:35 2021 +0000
     1.2 +++ b/linld/stuff/src/pipehole.awk	Tue Jan 12 07:47:12 2021 +0000
     1.3 @@ -159,7 +159,7 @@
     1.4  	sub(/_imgs\+65534/,"_imgs-2")
     1.5  	if (/setup_sects == 0/) isload=9
     1.6  	if (isload == 9) {  # LOAD.LST
     1.7 -		sub(/,0/,",al")
     1.8 +		sub(/,0/,",al	; worst case 2k boundary (iso)")
     1.9  		if (/jne/) isload=0
    1.10  	}
    1.11  	if (/cmd_line_ptr =/ && is386 == 0) isload=7
    1.12 @@ -261,7 +261,7 @@
    1.13  			sub(/mov	al/,"movzx	eax")
    1.14  		}
    1.15  		if (is386 == 0) {
    1.16 -			if (/m->size -= _rm_size/) print "	cwd"
    1.17 +			if (/m->size -= _rm_size/) print "	cwd	; do not trust rewind result (iso case)"
    1.18  			sub(/,0$/,",dx")
    1.19  		}
    1.20  		if (/ax,word ptr/) next
    1.21 @@ -308,9 +308,8 @@
    1.22  		if (/,bx/) next
    1.23  		if (/isoreadrootsector/) {
    1.24  			print
    1.25 -			print "	cmp	word ptr [si+39],17475"
    1.26 -			print "	stc"
    1.27 -			$0="	jne	returnC"
    1.28 +			print "	xor	word ptr [si+39],17475	; clear C"
    1.29 +			$0="	jne	returnNotC"
    1.30  		}
    1.31  	}
    1.32  	if (/cpytodirpage.x->dirpage/) isiso=16
    1.33 @@ -436,7 +435,7 @@
    1.34  		if (/@2@142$/) { print "	inc	di"; sub(/jmp/,"loop") }
    1.35  	}
    1.36  	if (/i\+36\]/) next
    1.37 -	sub(/DGROUP:_isostate\[bx/,"[bx+si")
    1.38 +	sub(/di,offset DGROUP:_isostate/,"di,si")
    1.39  	 } # file == "iso9660.cpp"
    1.40  	if (wascall) {
    1.41  		if (rcall != "") {