United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6367074 Hotspot should isolate JVM details for library linking
6367074 : Hotspot should isolate JVM details for library linking

Details
Type:
Enhancement
Submit Date:
2005-12-23
Status:
Closed
Updated Date:
2012-09-17
Project Name:
JDK
Resolved Date:
2010-06-22
Component:
hotspot
OS:
generic
Sub-Component:
runtime
CPU:
generic
Priority:
P3
Resolution:
Future Project
Affected Versions:
6
Fixed Versions:
8-pool

Related Reports
Relates:
Relates:
Relates:

Sub Tasks

Description
This RFE is expected to improve the dynamic (and static) linking story for Java SE by providing a linkage target that hides Hotspot implementation details, specifically to do with the current situation with per-compiler libjvm.so files but covering more issues than that. See 4777947 for history and additional details. Here is the specific proposal from Fred Oliver in the notes of that CR:

"There is quite a long email trail associated with this bug, and since I
am passing it on, I document some of the goals and constraints, and a
possible solution.

Requirement

(1) Native applications embedding Java using the invocation API should
not be required to set the LD_LIBRARY_PATH in advance (for dynamicly
loading the JVM).  Applications which staticly link to the JVM should
require LD_LIBRARY_PATH set only to select the JVM to use.

Goals

(2) The same solution should work on both Solaris and Linux.
(3) The solution should allow the linker argument "-z defs" so that no
symbols are left undefined, only to be detected later on.

Proposal

Create a new libjvmsyms.so which
(a) Lives in jre/lib/<processor> with the other native libraries.
(b) Defines every private JVM entry point required by our native
    libraries. 
    + All of our native libraries requiring these entry points will be
      linked against this new library (instead of libjvm.so), and bound
      to it by including $ORIGIN in the runpath.
    + None of these entry points will ever actually be called, because
      the JVM will be loaded first, and its symbols will override those
      in the new library.
(c) Implements the entry points as fatal errors (to guarantee that they
    aren't called)."

                                    

Comments
EVALUATION

The stumbling block to this issue is really that we have two compilers
implemented as a monolithic libjvm.so. The tiered-compilation will solve
this problem, whereby we will have a single libjvm.so which contains
both C1 and C2 and adaptively uses the compilers. Though the tiered compilation
work is almost done, we have to wait for the libraries to be consolidated.
See 6272349. with that in mind, its not very clear what else this CR is supposed
to address which are not being addressed by all the other LD_LIBRARY_PATH
sanification work.
                                     
2006-11-10



Hardware and Software, Engineered to Work Together