[tools-linking] Running shared object

2008-06-10 Thread Ali Bahrami
verma wrote: > Thanks Ali for your response. > Ali wrote: >> I may be missing something, but if foo() is >> your entry point, what are you returning to? > Yes foo() is my entry point. > >> I think exit(0) is your only way out. > Ok but why exit(0) is required. Why I can not use return 0. > Beca

[tools-linking] Running shared object

2008-06-09 Thread verma
Thanks Ali for your response. Ali wrote: >I may be missing something, but if foo() is >your entry point, what are you returning to? Yes foo() is my entry point. >I think exit(0) is your only way out. Ok but why exit(0) is required. Why I can not use return 0. This message posted from opensolar

[tools-linking] Running shared object

2008-06-09 Thread Ali Bahrami
verma wrote: > 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 f

[tools-linking] Running shared object

2008-06-09 Thread verma
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() {