[PATCH] Re: glitch with strlen [was: Re: Shells in 1.1.2]

Jason Schoon floydpink at gmail.com
Fri May 5 13:53:29 UTC 2006


On 5/5/06, Bernhard Fischer <rep.nop at aon.at> wrote:
>
>
> Proposed real fix:
> apply attached busybox.fix_strlen.01.diff
> and then replace all strlen() with bb_strlen() e.g. via
> find ./ -name "*.c" -exec egrep --exclude='*xfuncs.c*' \
> --exclude='*scripts/*' -Hl "[^_]strlen" {} \; | xargs \
> sed -i -e "/[^_]strlen/s/strlen/bb_strlen/g"
>
> The end result is that it is even smaller for the .config provided by
> Joe Shaw earlier in this thread and does what it's supposed to do:
>
>    text    data     bss     dec     hex filename
> 867078    7656  825676 1700410  19f23a ../bb.svn.oorig/busybox.landley
> 867062    7656  825676 1700394  19f22a busybox.strlen_ok.gcc-4.1
>
> objections or can i go and check this in early next week?


I assume that if you go with this approach, we will no longer try to do
anything with strlen() in the preprocessor or build process?  Thus, if a new
applet came in which used strlen(), it would simply not be as optimized on
GCC, but would still function perfectly fine?

In that case, I think this is a good approach.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20060505/1a9f8248/attachment-0002.htm 


More information about the busybox mailing list