This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Eliminate write_register from solib-sunos.c
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: drow at false dot org (Daniel Jacobowitz)
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 14 May 2007 22:28:49 +0200 (CEST)
- Subject: Re: [rfc] Eliminate write_register from solib-sunos.c
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