This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]