I tried to run a shared object. I am able to build and run the shared object after giving entry point and -I /user/lib/ld.so.1 option, but its giving segmentation fault after printing my printf statement. I changed the code from return(0) and call exit(0), now its working fine.
int foo() { printf("Hi from foo\n"); return(0); } int foo() { printf("Hi from foo\n"); exit(0); } Can any one help me why its not working when I called return(0). Is this due to c run time library(crt1.s) code or something else. This message posted from opensolaris.org