[vmkit-commits] [PATCH] Use version script to make OpenJDK's symbol versioning req's happy

Nicolas Geoffray nicolas.geoffray at gmail.com
Wed Oct 26 13:06:43 PDT 2011


On Wed, Oct 26, 2011 at 2:29 AM, Will Dietz <wdietz2 at illinois.edu> wrote:

> Inlined below.
>
> OpenJDK's libjava.so refuses to load without the symbols it wants
> having the proper versions, and this patch addresses that.
>
> This is kinda lame, but a)other VM's such as CACAO do this ("all the
> cool kids are doing it"), and b)I'm not sure what other options we
> have.
>
> As for b), I've chatted with OpenJDK guys on the topic and matching
> their versioning seemed the best/only way to go.
>
> Only other method I've found (besides asking users to build a special
> OpenJDK build without the versioning) is in JamVM--which does
> something different that I don't understand.  It seems to rely on
> loading *both* libjvm's


What are the two 'libjvms'?


> --and using one to resolve the symbols and the
> other to satisfy the versioning requirement but not actually use those
> symbols.  As I said, I'm not sure how that works, so for now this
> seems the best bet.
>
> ~Will
>
> >From 39d08a0d277d6e170446af46b41f5c7fac8bb257 Mon Sep 17 00:00:00 2001
> From: Will Dietz <w at wdtz.org>
> Date: Fri, 14 Oct 2011 11:38:38 -0500
> Subject: [PATCH 2/3] Use version script to make OpenJDK's symbol versioning
>  req's happy.
>
> ---
>  tools/jvm/Makefile |    1 +
>  tools/jvm/mapfile  |    5 +++++
>  2 files changed, 6 insertions(+), 0 deletions(-)
>  create mode 100644 tools/jvm/mapfile
>
> diff --git a/tools/jvm/Makefile b/tools/jvm/Makefile
> index 88b7303..9a62a11 100644
> --- a/tools/jvm/Makefile
> +++ b/tools/jvm/Makefile
> @@ -20,3 +20,4 @@ include $(LEVEL)/Makefile.common
>
>  USEDLIBS_FULL = $(addprefix $(LibDir)/lib,$(USEDLIBS))
>  LDFLAGS += -Wl,-whole-archive $(USEDLIBS_FULL) -Wl,-no-whole-archive
> +LDFLAGS += -Wl,--version-script=$(PROJ_SRC_DIR)/mapfile
> diff --git a/tools/jvm/mapfile b/tools/jvm/mapfile
> new file mode 100644
> index 0000000..fd02db7
> --- /dev/null
> +++ b/tools/jvm/mapfile
>

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?


> @@ -0,0 +1,5 @@
> +SUNWprivate_1.1 {
> +global:
> +  JVM_*;
> +  jio_*;
> +};
>

Scary, maybe I need to see what is that used for to understand why it's
being this way.


> --
> 1.7.5.1
> _______________________________________________
> vmkit-commits mailing list
> vmkit-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/vmkit-commits/attachments/20111026/2666e2f6/attachment.html>


More information about the vmkit-commits mailing list