|
|||||||||||
|
Debugging ld.so
From: Kurt Miller <truk(at)optonline.net>
Date: Sat Jun 07 2003 - 23:39:42 EDT Using DL_DEB statements in the _dl_boot function in libexec/ld.so : loader.c, I know that the segfault is happening while executing line 365/366: (*(void (*)(Elf_Addr))(sym->st_value + ooff)) ((Elf_Addr)_dl_dtors); The comments and code indicate this code calls the atexit function. I placed printf statements in the atexit function of libc/stdlib/atexit.c (don't do this at home), however I never reach them while attempting to execute javac_g. (I did see my printf all over while executing other stuff and I would not recommend doing it at least not without a backup of libc). OK, at this point I'm a bit perplexed because I expected to see the printf's I added to libc/stdlib/atexit.c, but I didn't. However, I know something is being executed by lines 365/366 in loader.c because DL_DEB statements are being output from dlopen:
calling atexit - (before line 365 of loader.c)
dlopen: loading: libc.so
Program received signal SIGSEGV, Segmentation fault.
0x0 in ?? ()
So I'm stuck. Something is being executed but I don't know what. I haven't been able to put a breakpoint in using gdb because all of this happens before the main function of javac_g. Is there a way I can halt execution and step through this code? or Would someone enlighten me as to what is being executed by line 365/366 so I can continue using DL_DEB or printf's to figure this out? Any assistance, RTFM or flames welcome ;-)
Thanks,
This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:48:42 EDT |
||||||||||
|
|||||||||||