public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* GC symbols no longer exported (on Debian) from libgcj 8 and up
@ 2009-11-27  9:06 Erik Groeneveld
  2009-11-27  9:25 ` Andrew Haley
  0 siblings, 1 reply; 3+ messages in thread
From: Erik Groeneveld @ 2009-11-27  9:06 UTC (permalink / raw)
  To: java

L.S.,

I have an application that uses libgcj (on Debian) and which needs to
have access to the garbage collector to fine tune things.  Up to
libgcj 7, it was possible to create a extern/forward declaration for
e.g. GC_free, and when the application is linked, the symbol would be
resolved correctly.

Starting with libgcj 8 and up, the symbols of libgcj are no longer
exported it seems. On Linux, 'nm' reports that the symbols are of type
't', which means local, while up to libgcj 7, it reported them as 'T',
which means global.  Symbols of type 't' are not used for resolving
external symbols, and hence my program does not link anymore.

I dived into the package build for Debian (by Mattias Klose) and found
that lot of things could have caused this behavior.  However, what I
can not find out is if this change was intentional or that is is
caused by newer versions of the build tools.

If it was intentional, my question is how I can get access to the GC?
If it is not intentional, my question is if it is appropriate to report a bug?

Best regards
Erik J. Groeneveld

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: GC symbols no longer exported (on Debian) from libgcj 8 and up
  2009-11-27  9:06 GC symbols no longer exported (on Debian) from libgcj 8 and up Erik Groeneveld
@ 2009-11-27  9:25 ` Andrew Haley
  2009-12-09 12:39   ` Erik Groeneveld
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Haley @ 2009-11-27  9:25 UTC (permalink / raw)
  To: Erik Groeneveld; +Cc: java

Erik Groeneveld wrote:

> I have an application that uses libgcj (on Debian) and which needs to
> have access to the garbage collector to fine tune things.  Up to
> libgcj 7, it was possible to create a extern/forward declaration for
> e.g. GC_free, and when the application is linked, the symbol would be
> resolved correctly.
> 
> Starting with libgcj 8 and up, the symbols of libgcj are no longer
> exported it seems. On Linux, 'nm' reports that the symbols are of type
> 't', which means local, while up to libgcj 7, it reported them as 'T',
> which means global.  Symbols of type 't' are not used for resolving
> external symbols, and hence my program does not link anymore.
> 
> I dived into the package build for Debian (by Mattias Klose) and found
> that lot of things could have caused this behavior.  However, what I
> can not find out is if this change was intentional or that is is
> caused by newer versions of the build tools.
> 
> If it was intentional, my question is how I can get access to the GC?

The symbols exported are controlled by:

if ANONVERSCRIPT
extra_ldflags_libjava += -Wl,--version-script=$(srcdir)/libgcj.ver
endif

Which is:

# Anonymous GNU ld version script to hide boehm-gc, libffi and fdlibm
# symbols in libgcj.so.

{
  global: Jv*; _Jv_*; __gcj_personality_v0; __gcj_personality_sj0; _Z*;
  local: *;
};

Andrew.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: GC symbols no longer exported (on Debian) from libgcj 8 and up
  2009-11-27  9:25 ` Andrew Haley
@ 2009-12-09 12:39   ` Erik Groeneveld
  0 siblings, 0 replies; 3+ messages in thread
From: Erik Groeneveld @ 2009-12-09 12:39 UTC (permalink / raw)
  To: Andrew Haley; +Cc: java

On Fri, Nov 27, 2009 at 10:25, Andrew Haley <aph@redhat.com> wrote:

>> If it was intentional, my question is how I can get access to the GC?
>
> The symbols exported are controlled by:
>
> if ANONVERSCRIPT
> extra_ldflags_libjava += -Wl,--version-script=$(srcdir)/libgcj.ver
> endif
>
> Which is:
>
> # Anonymous GNU ld version script to hide boehm-gc, libffi and fdlibm
> # symbols in libgcj.so.
>
> {
>  global: Jv*; _Jv_*; __gcj_personality_v0; __gcj_personality_sj0; _Z*;
>  local: *;
> };

Adding GC_*; to gloca

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-09 12:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-27  9:06 GC symbols no longer exported (on Debian) from libgcj 8 and up Erik Groeneveld
2009-11-27  9:25 ` Andrew Haley
2009-12-09 12:39   ` Erik Groeneveld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).