[BusyBox] further ash size reduction
Manuel Novoa III
mjn3 at busybox.net
Tue Aug 7 11:50:52 UTC 2001
vodz,
On Tue, Aug 07, 2001 at 08:57:18PM +0400, Vladimir N. Oleynik wrote:
> Manuel Novoa III wrote:
> >
> > 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.
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.
Manuel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ash.c-diff-010807.gz
Type: application/octet-stream
Size: 11828 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20010807/097130f6/attachment.obj
More information about the busybox
mailing list