Error calling method from a shared object

Ashish Srivastava ashish7s@yahoo.com
Wed Feb 5 03:33:00 GMT 2003


Hi,
  Wrote a simple java class as :

import java.lang.*;

public class A {
  public prnt() {
     System.out.println("Hello World");
  }
}


Compiled it with gcj and linked libgcj.so and
libiconv.so and created a shared object libA.so. Again
wrote a short 'C' program :

main() {
   _Zx726xkjad();
}

This method is read by using 'nm' on libA.so. Compiled
 it with gcc and linked libA.so. While running this
C-code it gives segmentation fault. The whole test was
also performed with in a web server to call a function
from a shared object during initiation. In both these
cases there was a segmentation fault. (In second case
it is :

[04/Feb/2003:20:04:20] config (22135): SIGSEGV 11
segmentation violation

[04/Feb/2003:20:04:20] config (22135):     si_signo
[11]: SEGV

[04/Feb/2003:20:04:20] config (22135):     si_errno
[0]: 

[04/Feb/2003:20:04:20] config (22135):     si_code
[1]: SEGV_MAPERR [addr: 0x0]




I am new to gcj and this way of programming. Any help
is highly appreciated. 

Thanks,
-Ashish



=====
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
/_/_/_/Ashish Srivastava/_/_/_/
/_/_/(ashish7s@yahoo.com)_/_/_/
/_/http://www.pranshatak.com _/
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the Java mailing list