Wed Nov 27 13:59:00 GMT 2002
Anthony Green wrote:
> My suggestion
> is to pull libgcj's org.xml and org.w3c out into lib-org-xml.so and
> lib-org-w3c.so, and link these into every program _unless_ we use a new
> compiler flags -fno-jaxp (or something like that). This would let
> people link against newer implementations of these classes and retain
> the nice feature of not having to worry about adding compiler/linker
> flags in the default case.
That's a bit of a kludge, but ok for now. However, we *know* at
compile time which libraries need to be linked, so the system
should remember that. I'd like a mechanism such that if the compiler
generates a reference to a class in FOO.jar, then it should see if there
is a libFOO.so, and if so place in the .o file somethat that acts
like an implicit -lFOO.
I don't know how to do this, and it certainly isn't really
feasible with some .o formats, but I see no reason it can't
be done for (say) ELF. It is possible we might have to extend
the linker, but I wouldn't be surprised if it already supports this
- only doesn't get used.
Similar, if the compiler calls cos, it should associate an implied
-lmath in the generated .o file (if there is a separate libmath.so,
which I guess is rare these days).
Perhaps there are some ld/ELF experts at Red Hat you can ask about
the difficulty of this idea?
More information about the Java