[rfc] Eliminate write_register from solib-sunos.c

Ulrich Weigand uweigand@de.ibm.com
Mon May 14 20:28:00 GMT 2007


Daniel Jacobowitz wrote:
> On Mon, May 14, 2007 at 05:00:12PM +0200, Ulrich Weigand wrote:
> > Interestingly enough, it would appear that none of the Solaris targets
> > are actually using solib-sunos.o.  The only references I can find are
> > in various bsd *native* target's .mh files.
> > 
> > In fact, this is very weird as those same bsd targets have solib-svr4.o
> > in their .mt files.  Which one is getting used in that case?  I'll try
> > to find out what's going on here ...
> 
> Don't confuse SunOS and Solaris :-) I believe that solib-sunos.c is
> for a.out shared libraries.  However I don't know which one ends up
> used... maybe they're getting lucky with link order?

That's it: the TDEP files come *before* NAT files in link order,
thus the _initialize_svr4_solib function is called before
_initialize_sunos_solib in init.c, and as both set the 
current_target_so_ops variable, the second call wins.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com



More information about the Gdb-patches mailing list