# HG changeset patch # User Pascal Bellard # Date 1560629538 -7200 # Node ID 30270fe0d1b33a16fa67742c6317e90cdfb0d274 # Parent 74a62a08433a57f6015c2931fe6b720c121c285b tazboot: shrink (again) diff -r 74a62a08433a -r 30270fe0d1b3 linld/stuff/src/TAZBOOT.CPP --- a/linld/stuff/src/TAZBOOT.CPP Sat Jun 15 18:53:05 2019 +0200 +++ b/linld/stuff/src/TAZBOOT.CPP Sat Jun 15 22:12:18 2019 +0200 @@ -19,9 +19,9 @@ static void next_chunk(struct image_himem *m) { + m->chunk_size = 0; if (m->state >= initrd_state.cnt) return; struct initrd_info *i = &initrd_state.info[m->state]; - m->chunk_size = 0; m->chunk_size = i->size; m->state++; lseekset2(m->fd,&i->ofs); diff -r 74a62a08433a -r 30270fe0d1b3 linld/stuff/src/pipehole.awk --- a/linld/stuff/src/pipehole.awk Sat Jun 15 18:53:05 2019 +0200 +++ b/linld/stuff/src/pipehole.awk Sat Jun 15 22:12:18 2019 +0200 @@ -110,8 +110,14 @@ sub(/DGROUP:_base_himem,/,"[bx],") sub(/DGROUP:_base_himem\+2,/,"[bx+2],") sub(/DGROUP:_base_himem\+3,/,"[bx+3],") - if (/ax,word ptr \[bx\+2\]/ || /\[bp-4\],ax/) sub(/ax/,"bx") - if (/bx,ax/) next + if (/word ptr \[bx\+2\],0/) { + print s + hold=0 + print " mov bx,word ptr [bx+2]" + $0=" or bx,bx" + } + if (/\[bp-4\],ax/) sub(/ax/,"bx") + if (/ax,word ptr \[bx\+2\]/ || /bx,ax/) next if (/@strcmp\$qpxzct1/) isotazboot=0 } if (/static void addinitrd/) isotazboot=100