A patch to offset the rant.

Rob Landley rob at landley.net
Sun Oct 24 01:14:23 UTC 2010


I've decided that every time I rant about something on the list, I need to 
provide a patch to make up for it, so here's an #ifdefectomy for awk.c.

In gcc 4.3.3, this bloats the code by one byte, and does so in the function 
"fsrealloc" which I didn't even _touch_.  I boggled at this a bit, and did 
this little bit of black magic to take a closer look:

  diff -u <(scripts/showasm busybox_old fsrealloc | cut -b 11-) \
     <(scripts/showasm busybox_unstripped fsrealloc | cut -b 11-) | less

For some reason, the optimizer is spilling r13 into a global instead of being 
able to cache it in edx.  I have NO idea why, looks like a bug in gcc to be 
honest, and I suspect different gcc versions will behave differently here.

Possibly the above bit of black magic should become a "scripts/bloatcheckdiff" 
or similar, with fsrealloc becoming $1 and probably the "cut -b 11-" replaced 
with something less hackish...

Rob
-- 
GPLv3: as worthy a successor as The Phantom Menace, as timely as Duke Nukem 
Forever, and as welcome as New Coke.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: awk-ifdefectomy.patch
Type: text/x-patch
Size: 2805 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20101023/de1f0ed0/attachment.bin>


More information about the busybox mailing list