[RFC] Boehm GC changes for uClibc.
Joakim Tjernlund
joakim.tjernlund at transmode.se
Mon Apr 17 23:33:32 UTC 2006
> -----Original Message-----
> From: uclibc-bounces at uclibc.org
> [mailto:uclibc-bounces at uclibc.org] On Behalf Of David Daney
> Sent: den 17 april 2006 20:39
> To: Java Patch List
> Cc: uclibc at 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
More information about the uClibc
mailing list