wok rev 21752

tazboot: shrink (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jun 15 22:12:18 2019 +0200 (2019-06-15)
parents 74a62a08433a
children 2fdd74522103
files linld/stuff/src/TAZBOOT.CPP linld/stuff/src/pipehole.awk
line diff
     1.1 --- a/linld/stuff/src/TAZBOOT.CPP	Sat Jun 15 18:53:05 2019 +0200
     1.2 +++ b/linld/stuff/src/TAZBOOT.CPP	Sat Jun 15 22:12:18 2019 +0200
     1.3 @@ -19,9 +19,9 @@
     1.4  
     1.5  static void next_chunk(struct image_himem *m)
     1.6  {
     1.7 +	m->chunk_size = 0;
     1.8  	if (m->state >= initrd_state.cnt) return;
     1.9  	struct initrd_info *i = &initrd_state.info[m->state];
    1.10 -	m->chunk_size = 0;
    1.11  	m->chunk_size = i->size;
    1.12  	m->state++;
    1.13  	lseekset2(m->fd,&i->ofs);
     2.1 --- a/linld/stuff/src/pipehole.awk	Sat Jun 15 18:53:05 2019 +0200
     2.2 +++ b/linld/stuff/src/pipehole.awk	Sat Jun 15 22:12:18 2019 +0200
     2.3 @@ -110,8 +110,14 @@
     2.4  		sub(/DGROUP:_base_himem,/,"[bx],")
     2.5  		sub(/DGROUP:_base_himem\+2,/,"[bx+2],")
     2.6  		sub(/DGROUP:_base_himem\+3,/,"[bx+3],")
     2.7 -		if (/ax,word ptr \[bx\+2\]/ || /\[bp-4\],ax/) sub(/ax/,"bx")
     2.8 -		if (/bx,ax/) next
     2.9 +		if (/word ptr \[bx\+2\],0/) {
    2.10 +			print s
    2.11 +			hold=0
    2.12 +			print "	mov	bx,word ptr [bx+2]"
    2.13 +			$0="	or	bx,bx"
    2.14 +		}
    2.15 +		if (/\[bp-4\],ax/) sub(/ax/,"bx")
    2.16 +		if (/ax,word ptr \[bx\+2\]/ || /bx,ax/) next
    2.17  		if (/@strcmp\$qpxzct1/) isotazboot=0
    2.18  	}
    2.19  	if (/static void addinitrd/) isotazboot=100