This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Enhancement Request
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Glenn Chambers <gchamber at bright dot net>
- Cc: tromey at redhat dot com, <java at gcc dot gnu dot org>
- Date: Wed, 1 Jan 2003 22:14:57 -0500 (EST)
- Subject: Re: Enhancement Request
On Tue, 31 Dec 2002, Glenn Chambers wrote:
> My problem with this strategy is that I find it hard to see how linking
> two distinct versions of 'libgc' will be able to work. Even assuming the
> code issues work out, there's still the fact that there will be two gc'd
> memory pools running in parallel, resulting in memory wastage. There's
> also the mildly interesting question of whether GC-A will scan GC-B's
> pool looking for live pointers into GC-A's pool of objects.
Can you simply link your Portable.NET application to libgcj.so instead of
libgc.a/libffi.a?
> Upon further review, it seems that unless libffi has a bunch of global
> data structures (I haven't looked), that having two distinct
> implementations
> in the same application is unlikely to cause major problems. The issue
> is the same as libgc - if Portable.NET links statically against libffi.1
> and loads libgcj.so, which contains a libffi.2 (statically linked), then
> what happens to any globals from libffi? If they're distinct, then
> things (should) work; if one overrides the other, then I'm doomed.
In an ELF executable, the first occurrence of a global symbol generally
overrides any other (unless a DSO is built with -Bsymbolic). For libffi
that isn't necesssarily fatal... the first one should be shared by pnet
and libgcj, the second one just wastes space.
Jeff