BusyBox 1.2.2.1 released
Added compile-time warning that static linking against glibc produces buggy executables."
Posted Nov 10, 2006 16:26 UTC (Fri)
by landley (guest, #6789)
[Link]
Posted Dec 17, 2006 5:57 UTC (Sun)
by Jackie (guest, #37933)
[Link]
I met the similar promblem showed blow while making busybox-1.3.0 .
jack@ma:~/kernel/busybox-1.3.0$ make
Although I deleted "--gc-sections" from Makefile according to your suggestion(Note:there isn't Rule.make in the package),it still doesn't work and displays the message as above.
Can you give me any suggestion or information?
Thanks
The 1.2.2 release has dozens and dozens of fixes (which last week's notice BusyBox 1.2.2.1 released
missed; it seems lwn.net's screen scraper for busybox.net got confused;
check the website for the list). That was the last release from the old
maintainer (me).
1.2.2.1 was a single patch for a bug in glibc: if you statically link
against glibc and then tell the linker to garbage collect unused elf
sections, glibc's stdio breaks (redirected output disappears). This is
_not_ a BusyBox bug. You can reproduce this problem with a "hello world"
program like so:
gcc -static -Wl,--gc-sections hello.c && (./a.out | cat)
Running "./a.out | cat" produces no output with current glibc, but does
produce output with something like uClibc (or sufficiently old versions of
glibc that didn't have this bug; ubuntu 5.10 I think?) That's the bug.
Enough people hit this that the new maintainer (Denis Vlasenko) put out
1.2.2.1, although his patch doesn't actually fix this problem, it just
adds a big warning about it. To work around the bug, remove the line
containing --gc-sections from BusyBox's Rules.mak if you plan to
statically link against glibc. Yes this makes busybox bigger, but
statically linking against glibc costs you half a megabyte at the best of
times so obviously you don't care about size if you hit this bug...
HiBusyBox 1.2.2.1 released
CC applets/applets.o
applets/applets.c:22:2: error: #warning Static linking against glibc produces buggy executables
applets/applets.c:23:2: error: #warning (glibc does not cope well with ld --gc-sections).
applets/applets.c:24:2: error: #warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400
applets/applets.c:25:2: error: #warning Note that glibc is utterly unsuitable for static linking anyway.
make[1]: *** [applets/applets.o] Error 1
make: *** [applets] Error 2
-jackie