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

linld: no initrd fix
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Dec 15 08:41:50 2020 +0000 (2020-12-15)
parents 34d90fb03f57
children a946c1651082
line diff
     1.1 --- a/linld/stuff/src/pipehole.awk	Sat Dec 12 17:26:44 2020 +0000
     1.2 +++ b/linld/stuff/src/pipehole.awk	Tue Dec 15 08:41:50 2020 +0000
     1.3 @@ -22,6 +22,8 @@
     1.4  	if (/add	si,2/) $0="	lodsw	; " $0
     1.5  	if (/add	di,2/) $0="	scasw	; " $0
     1.6  	if (/bx,offset DGROUP:s@\+26/) sub(/mov/,";mov")
     1.7 +	if (/bx,si/ || /\[bp-2\]/) next
     1.8 +	sub(/\[bx\],0/,"[si],0")
     1.9  	if (islinld==1) {
    1.10  		print "; " $0
    1.11  		if (!/word ptr/) next
    1.12 @@ -228,7 +230,7 @@
    1.13  	}
    1.14  	if (/void load_initrd\(\)/) isload=3
    1.15  	if (isload == 3) {  # LOAD.LST
    1.16 -		if (/short @2@198/) sub(/@2@198/,"load_initrd_ret")
    1.17 +		if (/je	short @2@.*/) sub(/@2@.*/,"load_initrd_ret")
    1.18  		if (/mov	ax,word ptr \[si\]/) $0="	lodsw"
    1.19  		if( /jmp/) {
    1.20  			print "load_initrd_ret:"