[BusyBox] further ash size reduction
Vladimir N. Oleynik
dzo at simtreas.ru
Wed Aug 8 07:56:03 UTC 2001
Manuel,
> > > While I was looking at ash.c w.r.t. the is_special() macro, I couldn't help
> > > but notice the large number of redundant entries in the syntax tables. So,
> > > I collapsed them using indirect addressing. On i386, this patch drops the
> > > size of ash.o for me by 1k. I only minimially tested it though, as I've
> > > wasted enough time on this tangent for today.
> >
> > Amazingly! I could increase readable a code and in the beginning it seemed,
> > that have won at a rate of, but then appeared, that the result is worse on 280
> > bytes. ;-(
>
> I wound up working on ash some more last night. Again, this stuff is only
> mininally tested. I did find one bug though, that I would appreciate you
> looking at. The syntax tables have 257 elements and the base is adjusted
> by 130. That means the acceptable range of values is -130 to 126! I needed
> to add an entry for 127, but I'm not sure if the values I used were correct.
You are right. The additional symbol is necessary.
The initilal ash-0.2 code was without support aliases and
-PEOF=SYNBASE=129
syntax_index in our version have addition symbol[1]=SPCTL_CIGN_CIGN_CIGN
but not have symbol for '\127'+SYNBASE. Thanks!
> In any case, here's my latest patch. I still haven't changed the code
> regarding tokendlist. I'm getting a savings of about 2k over the current
> cvs version. Major new changes were to cmdtxt(), calcsiz(), copynode(),
> and ulimitcmd. There are other minor changes here and there though.
Ah, Amazingly! My variant worse 20 bytes now (for syntax table magic) and
I not surrender ;)
--w
vodz
More information about the busybox
mailing list