Linking libgcj, and Java security

Jeff Sturm jsturm@one-point.com
Tue Dec 3 18:13:00 GMT 2002


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


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /