This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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] Make java compiled resources public.


Marco Trudel wrote:
David Daney wrote:
This patch makes java compiled resources public symbols.  This is needed
so that when statically linking to libgcj, the resource files in
libgcj.a can be linked by passing -u to the linker.

Awesome! That was indeed a pain so far...
Can you give a concrete example how the linker line will look like? For instance, there was just recently someone on the users list running into an "java.util.MissingResourceException: Bundle gnu/java/util/regex/MessagesBundle not found".
How can that missing bundle be included into the compilation with your new solution?



For the case of java/util/iso4217.properties it would be Something like: -Wl,-u -Wl,_ZGr5_java5_util20_iso4217$_properties


Alternately in some C or C++ object that is linked you could do:

extern "C" {
extern int  _ZGr5_java5_util20_iso4217$_properties;
static int *foo = &_ZGr5_java5_util20_iso4217$_properties;
}


For gnu/java/util/regex/MessagesBundle, you would have to figure out how it mangles. The easiest would be to paste in the output of nm run on the object to see how it was mangled.


David Daney


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