On Wed, Oct 26, 2011 at 2:29 AM, Will Dietz <span dir="ltr"><<a href="mailto:wdietz2@illinois.edu">wdietz2@illinois.edu</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Inlined below.<br>
<br>
OpenJDK's libjava.so refuses to load without the symbols it wants<br>
having the proper versions, and this patch addresses that.<br>
<br>
This is kinda lame, but a)other VM's such as CACAO do this ("all the<br>
cool kids are doing it"), and b)I'm not sure what other options we<br>
have.<br>
<br>
As for b), I've chatted with OpenJDK guys on the topic and matching<br>
their versioning seemed the best/only way to go.<br>
<br>
Only other method I've found (besides asking users to build a special<br>
OpenJDK build without the versioning) is in JamVM--which does<br>
something different that I don't understand.  It seems to rely on<br>
loading *both* libjvm's</blockquote><div><br></div><div>What are the two 'libjvms'?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">--and using one to resolve the symbols and the<br>

other to satisfy the versioning requirement but not actually use those<br>
symbols.  As I said, I'm not sure how that works, so for now this<br>
seems the best bet.<br>
<br>
~Will<br>
<br>
>From 39d08a0d277d6e170446af46b41f5c7fac8bb257 Mon Sep 17 00:00:00 2001<br>
From: Will Dietz <<a href="mailto:w@wdtz.org">w@wdtz.org</a>><br>
Date: Fri, 14 Oct 2011 11:38:38 -0500<br>
Subject: [PATCH 2/3] Use version script to make OpenJDK's symbol versioning<br>
 req's happy.<br>
<br>
---<br>
 tools/jvm/Makefile |    1 +<br>
 tools/jvm/mapfile  |    5 +++++<br>
 2 files changed, 6 insertions(+), 0 deletions(-)<br>
 create mode 100644 tools/jvm/mapfile<br>
<br>
diff --git a/tools/jvm/Makefile b/tools/jvm/Makefile<br>
index 88b7303..9a62a11 100644<br>
--- a/tools/jvm/Makefile<br>
+++ b/tools/jvm/Makefile<br>
@@ -20,3 +20,4 @@ include $(LEVEL)/Makefile.common<br>
<br>
 USEDLIBS_FULL = $(addprefix $(LibDir)/lib,$(USEDLIBS))<br>
 LDFLAGS += -Wl,-whole-archive $(USEDLIBS_FULL) -Wl,-no-whole-archive<br>
+LDFLAGS += -Wl,--version-script=$(PROJ_SRC_DIR)/mapfile<br>
diff --git a/tools/jvm/mapfile b/tools/jvm/mapfile<br>
new file mode 100644<br>
index 0000000..fd02db7<br>
--- /dev/null<br>
+++ b/tools/jvm/mapfile<br></blockquote><div><br></div><div>What's 'tools/jvm'? Do you intend to be able to compile two executables, one for j3 with gnu classpath and one with j3 with openjdk?</div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
@@ -0,0 +1,5 @@<br>
+SUNWprivate_1.1 {<br>
+global:<br>
+  JVM_*;<br>
+  jio_*;<br>
+};<br></blockquote><div><br></div><div>Scary, maybe I need to see what is that used for to understand why it's being this way.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<font color="#888888">--<br>
1.7.5.1<br>
_______________________________________________<br>
vmkit-commits mailing list<br>
<a href="mailto:vmkit-commits@cs.uiuc.edu">vmkit-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits</a><br>
</font></blockquote></div><br>