This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
RE: [RFC] Boehm GC changes for uClibc.
- From: "Joakim Tjernlund" <joakim dot tjernlund at transmode dot se>
- To: "'David Daney'" <ddaney at avtrex dot com>, "'Java Patch List'" <java-patches at gcc dot gnu dot org>
- Cc: <uclibc at uclibc dot org>, "'Hans Boehm'" <hans_boehm at hp dot com>
- Date: Tue, 18 Apr 2006 01:33:32 +0200
- Subject: RE: [RFC] Boehm GC changes for uClibc.
> -----Original Message-----
> From: uclibc-bounces@uclibc.org
> [mailto:uclibc-bounces@uclibc.org] On Behalf Of David Daney
> Sent: den 17 april 2006 20:39
> To: Java Patch List
> Cc: uclibc@uclibc.org; Hans Boehm
> Subject: [RFC] Boehm GC changes for uClibc.
>
> I am trying to get libgcj running under uClibc. This patch
> is necessary
> to get a simple 'Hello World' program to run. Other
> patches will be needed for full functionality, but this one
> is a good start.
>
> The problem is the the Boehm GC is expecting to be able to
> find the link_map via the DT_DEBUG dynamic tag. The uClibc
> dynamic loader does not initialize DT_DEBUG (at least for
> MIPS) because doing so would dirty the page where it resides.
Yes, MIPS is the only arch not setting DT_DEBUG. MIPS uses
DT_MIPS_RLD_MAP instead. Look at dl-sysdep.h
BTW,
Whats the problem if MIPS also sets DT_DEBUG?
>
> The patch gains access the link_map via the global symbol
> _dl_debug_addr. Without the patch there is a SIGSEGV
> dereferencing the zero valued DT_DEBUG tag while doing
> _Jv_CreateJavaVM().
_dl_debug_addr is misnamed in uClibc. It should be named _r_debug instead.
On top of that I can't remember if _r_debug is a glibc thing or if
it is a "standard" symbol. If it is a glibc symbol it might be removed at some point.
If you must use _dl_debug_addr then please rename it and make if work as
in glibc first.
Jocke