This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

non-x86 Linux gc change



I've recently committed some GC changes for PowerPC Linux.

Other non-x86 Linux users might want to have a look 'cause I suspect
that it might help you also.

http://sourceware.cygnus.com/ml/java-patches/1999-q4/msg00088.html


When the collector is built and used as a shared library it cannot
find the program's data section correctly, resulting in SEGVs during
collection.  It should always work correctly when linked statically.

It's not an ideal patch because it relies on a weak symbol in crt1.o.
If the user's program happens to export their own "data_start" symbol
then we're in for trouble.

Another interesting idea would be to do what glibc does.  I didn't realize
this before, but /usr/lib/libc.so is actually a linker script...

/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )

We could do the same thing.  Right now we link libgcjgc.so to
libgcjgc-4.13a2.so.0.0.0.  Instead, we could replace it with a file
containing:

GROUP ( libgcjgc-4.13a2.so.0.0.0 libgcjgc-data.a )

Then we'd create and install a libgcjgc-data.a which only contains a
single byte of data, but with a special name that we use in the
collector's DATASTART macro.

Of course, this all sounds like a lot of work for something that is
unlikely to ever be a problem anyways. :-)

BTW - Tom - shouldn't that be libgcjgc-5.something now?

AG

-- 
Anthony Green                                               Cygnus Solutions
                                                       Sunnyvale, California

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]