This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: Linking libgcj, and Java security
- From: Jeff Sturm <jsturm at one-point dot com>
- To: "Boehm, Hans" <hans_boehm at hp dot com>
- Cc: "'Andrew Haley'" <aph at redhat dot com>, <java at gcc dot gnu dot org>
- Date: Tue, 3 Dec 2002 21:13:18 -0500 (EST)
- Subject: RE: Linking libgcj, and Java security
On Tue, 3 Dec 2002, Boehm, Hans wrote:
> If -Bsymbolic causes it to refer to something else, then we have a
> problem.
Indeed.
> Under Linux, this can probably be worked around with
> /proc/self/maps, though that's not ideal. There may be other solutions.
For gcj, could someone arrange to include a special object at the
beginning and end of each library or executable?
Something like:
-----------------------------------------------------------------
int __attribute__((__visibility__("hidden"))) _Jv_datastart = 1;
int __attribute__((__visibility__("hidden"))) _Jv_bssstart;
extern int _Jv_dataend;
extern int _Jv_bssend;
static void __attribute__((__constructor__))
_Jv_RegisterDataSegments (void)
{
extern void GC_add_roots (void *, void *);
GC_add_roots (&_Jv_datastart, &_Jv_dataend);
GC_add_roots (&_Jv_bssstart, &_Jv_bssend);
}
----------------------------------------------------------------
Jeff