Newbie question
Mike Katchabaw
katchab@csd.uwo.ca
Thu Jul 6 15:46:00 GMT 2000
Hi!
I'm new to gcj, and have a question for the list. Has anyone been able
to get gcj to work on HP-UX 11.0? I have gcc-2.95.2 and libgcj-2.95.1,
and I was able to build the gcj compiler as part of gcc with little
troubles. I had to use gas as my assembler and HP's ld since GNU ld
is not supported on this platform.
I was able to get libgcj to compile (after a little tweaking here and
there), and it got to the point where it was trying to build jv-convert
from a whole pile of object files and the newly built libgcj.a. It
complains with a ton of undefined symbols such as ...
> /bin/ld: Unsatisfied symbols:
> java::lang::StringBuffer::append(java::lang::String *) (data)
> java::util::Hashtable::toString(void)(data)
> java::lang::Math::min(int, int)(data)
> java::lang::Math::max(int, int)(data)
> java::util::Calendar::set(int, int, int)(data)
> ...
If I'm not mistaken, they all seem to be generated from .java files
using gcj (you'd know better than I!). From examining the above
output and the output from nm, the unsatisified symbols are flagged as
undef/data. They do appear in the libgcj.a library with the correct
name mangling as extern/entry symbols (meaning that they are in fact
defined there). I noticed, however, that all referenced C functions
and C++ methods compiled by gcc and g++ appear in object files as
undef/code symbols instead of undef/data. Missing C and C++
variables, however, do show up as undef/data.
I think, then, that the linker might be thinking the Java methods above
are actually variables and look for extern/data references instead
of extern/entry references to find the functions.
How would this be fixed? Since gcc and g++ seem to generate object
files that link ok, but gcj does not, I'm guessing the problem lies
somewhere in what gcj does. If gcj would flag these things as code
functions, I would be fine. Or if I could get the HP ld to match the
symbols up, I would be fine. (The second isn't likely because then
the linker would be linking variables to functions, as far as it
knows).
Anyone have any ideas or pointers? Your help is greatly appreciated.
Mike.
More information about the Java
mailing list