On 04/30/2012 03:28 PM, Laurent Bercot wrote: >> Can you report your uClibc configuration? I'm nearly certain you have >> locale disabled; if it's enabled, a lot more junk will be pulled in. > > I'm not sure. I'm using the binary uClibc-0.9.32.1 provided by the > Aboriginal Linux native-compiler-i686 toolchain, I don't know what > options have been compiled in. Cc to Rob so he can provide the > configuration.
Look in the "src" directory of the cross compiler, the uClibc config is in there. (Or in /usr/src of the root filesystem images.) I think locale is disabled too: last I looked the uClibc build process didn't contain its own locale information but harvested it from the host, which means it's a build break if you select locales the host hasn't got, and there was no sane subset guaranteed to be there. (Even the "minimal locales" involved more locale support than my basic Gentoo server install had, and I'm in en-us...) It's one of those issues I revisit every year or two and go "nope, still doesn't work"... >> Also I don't understand how using _exit changes anything. The startup >> code that calls main has a reference to exit (or equivalent code) >> anyway and has no way of determining that you'll be calling _exit >> early... > > I can only guess that gcc sees that main() is never returned from > and optimizes away everything that's referenced *after* the main() > call in _startup(). But I'm really not an expert on those things and > it's a wild, wild guess. Denys Vlasenko gave a nice talk on this sort of thing in 2010: http://www.embeddedlinuxconference.com/elc_2010/sessions.html#Vlasenko http://elinux.org/images/2/2d/ELC2010-gc-sections_Denys_Vlasenko.pdf http://free-electrons.com/pub/video/2010/elc/elc2010-vlasenko-dead-code.ogv Rob -- GNU/Linux isn't: Linux=GPLv2, GNU=GPLv3+, they can't share code. Either it's "mere aggregation", or a license violation. Pick one. _______________________________________________ uClibc mailing list [email protected] http://lists.busybox.net/mailman/listinfo/uclibc
