Bug in wc.
Denys Vlasenko
vda.linux at googlemail.com
Mon Mar 8 03:07:00 UTC 2010
On Monday 08 March 2010 01:48, Rob Landley wrote:
> And VMLINUZ_SIZE is:
>
> VMLINUX_SIZE := $(shell wc -c $(objtree)/$(KBUILD_IMAGE) 2>/dev/null | \
> cut -d' ' -f1)
>
> VMLINUX_SIZE is blank when using busybox tools.
>
> The underlying behavioral wonkiness in busybox "cut" is:
>
> $ busybox wc -c vmlinux
> 3335777 vmlinux
> $ wc -c vmlinux
> 3335777 vmlinux
>
> Note that we have leading whitespace, the gnu version doesn't. This leading
> whitespace is confusing the kernel build, because the cut -d' ' then triggers
> on our leading whitespace and produces an empty string, which propogates
> through the rest of the build to confuse the linker with a start address of
> "0x".
>
> Why do we have unnecessary leading whitespace? What happend to small and
> simple and doing no more than absolutely necessary?
Good question, I'm redirecting it to author of busybox-1.2.1 (or earlier)
since 1.2.1 displays the same behavior. ;)
--
vda
More information about the busybox
mailing list