This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hello, My apologies if this message doesn?t seem appropriate on this list. gcc version 3.4.6 20060404 (Red Hat 3.4.6-3) ES Linux 4.0 I am facing a dlopen() crash & am looking for guidance from C Gurus on the same. I have a small program:- #include <stdio.h> #include <dlfcn.h> int main() { ? void* _handle; printf ("\n Starting now !!! \n"); _handle = dlopen( "./libchrcv.so", RTLD_NOW | RTLD_GLOBAL ); ???????? if ( 0 == _handle ) ???????? { ??????????? printf("ShareableContentHandler::Load() - dlopen failed '%s'.\n", dlerror() ); ???????? } else ???????? { ??????????? printf("ShareableContentHandler::Load() - dlopen success '%s'.\n", dlerror() ); ???????? } return 0; } libchrcv.so is a shared library which in turn links against 2 libraries ? librcvagent.so and libcontrolagent.so. I verified that both these .so files are present in the path specified in LD_LIBRARY_PATH. I compile this program using gcc test.c ?ldl & it compiles & links fine. However, when I execute it, I get a segmentation fault. The output is:- Starting now !!! Segmentation fault There is no core file generated. I capture the LD_DEBUG output & it is attached for reference. I?ll be thankful if somebody can look at the attached file & guide me on what the problem is. Thanks in advance. Regards, Gaurav.
Attachment:
ld.out.28704
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |