Busybox won't init
Matt Johnson
mj1856 at hotmail.com
Fri Nov 5 15:30:46 UTC 2010
>
> No idea yet, but I have a suggestion how to find out.
>
> First, comment out the line where klogd is started.
>
> Second, determine what libc do you use (glibc? uclibc? etc),
> download its source tarball. In that tarball, find
> source code of openlog() and syslog() functions.
>
> Then, write this small test program:
>
> #include
> #include
> #include
> void my_openlog(const char *ident, int option, int facility) {
> ...
> }
> void my_syslog(int priority, const char *format, ...) {
> ...
> }
> int main() {
> printf("%s:%u: calling openlog\n", __func__, __LINE__);
> my_openlog("testing", 0, LOG_DAEMON);
>
> printf("%s:%u: calling syslog\n", __func__, __LINE__);
> my_syslog(LOG_INFO, "%s", "test message");
>
> printf("%s:%u: exiting\n", __func__, __LINE__);
> return 0;
> }
>
> Substitute ... with bodies of your libc's openlog() and syslog()
> functions. Add more printf("%s:%u\n", __func__, __LINE__);
> statements into their bodies.
>
> Compile it, then run it on your target machine.
>
> When you determine where exactly it segfault _inside_
> my_syslog() function, post your results.
>
> --
> vda
I'm using gcc-4.4.3 with glibc-2.9. It looks like syslog and openlog are defined in /misc/syslog.c of glibc. The functions have lots of dependancies, so it's going to take some time to get everything in place for the test. I'll post back when I have more to go on. Thanks.
-Matt.
More information about the busybox
mailing list