[parisc-linux] Re: gcj can't make shared libs on hppa

Randolph Chung randolph at tausq.org
Sun Mar 12 07:12:47 MST 2006


> r22 should be pointing to a function descriptor and have the plabel
> bit set.  It's a relative rare situation when an indirect call can
> be made directly (no shared libraries).

I know, but that's not what's happening....

__do_global_ctors_aux() looks like this:

static void __attribute__((used))
__do_global_ctors_aux (void)
{
   func_ptr *p;
   for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--)
     (*p) ();
}

what i'm seeing is that we are calling the copy of this function in 
liba1.so, and loading __CTOR_END__ via the GOT, but we are using an r19 
value that is pointing inside libgcj.so, so we end up loading some wrong 
value for __CTOR_END__

I don't know how/why this is happening though. how does this bit work? 
each .so has its own copy of __do_global_ctors_aux(); how does this get 
called and where does it setup r19 for each .so before this gets called?

randolph



More information about the parisc-linux mailing list