This is the mail archive of the gcc-patches@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]

Re: [RFA] boehm-gc for AIX


>>>>> "David" == David Edelsohn <dje@watson.ibm.com> writes:

David> 	What I am suggesting is that GC_INIT needs to be called from a
David> static constructor in the main program, much like GCC invokes
David> __main() on some platforms to run static constructors.  In
David> other words, gcj needs to internally generate a static
David> constructor in the main application invoking the equivalent of
David> GC_INIT when it encounters a method named main().  This is the
David> only way for libgcj to use boehm-gc correctly.

In some cases gcj generates main().  These cases are easy to handle.

The hard part is programs that use the JNI invocation API.  These are
C programs, with a C main(), which link against libgcj and make calls
into it.  I don't see how we could handle these programs.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]