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: [PATCH, libgcc] Disable JCR section when java is not enabled


On Thu, Oct 10, 2013 at 04:22:52PM +0800, Joey Ye wrote:
> Dear Java maintainers, are you OK with this patch?

Given the state of gcj that it is now only rarely used and most people
just use OpenJDK instead, wouldn't it be a good idea to just require
that gcj code is linked using gcj driver or, if linked in any other driver,
just using a special non-default option (-flink-jcr or similar), that would
be automatically set by gcj driver, move this JCR stuff out of the normal
crt* files and put it into crtjava*.o instead, and only link in if
-flink-jcr is passed or gcj driver used?  Or treat -lgcj as that magic
switch?

Or, alternatively, at least for selected targets, live with the extra 8
bytes in .jcr section for every binary/shared library, but move the
_Jv_RegisterClasses call into libgcj_nonshared.a and libgcj.a and make
libgcj.so be a linker script containing both libgcj_nonshared.a and
libgcj.so.*.

Also, looking at crtstuff.c makes me wonder where are classes deregistered,
there are only calls to _Jv_RegisterClasses, but never to to deregistration,
wonder what happens if you dlclose a shared library with registered classes.

	Jakub


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