Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@cygnus.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] solib-svr4.c: Fix set_solib_svr4_fetch_link_map_offsets
Date: Fri, 21 Sep 2001 20:31:00 -0000	[thread overview]
Message-ID: <1010922033121.ZM19871@ocotillo.lan> (raw)
In-Reply-To: <3BABEFC7.9020100@cygnus.com>

On Sep 21,  9:56pm, Andrew Cagney wrote:

> > As a heads up though, one of the problems is that solib-svr4.c
> > actually contains (ifdef'd) shared library support for both SVR4 and
> > SunOS.  I will be disentangling these mechanisms and will place SunOS
> > shared library support in its own file.  That way we'll be able to do
> > away with the SVR4_SHARED_LIBS macro and we won't accidentally attempt
> > to ever include <link.h> from solib-svr4.c any longer.
> 
> To be honest, I've been very tempted to solve this problem using a very 
> brutal approach: take solib-svr4.c, copy it to solib-aout.c, strip 
> out/in SVR4-SHARED_LIBS code, and then tweek the config files to use either.
> 
> I think this is one of those cases where the desire to re-use the code 
> was taken a little to far - better to get the interfaces right and have 
> a clear separation.  Who cares about a little duplication :-)

Actually, I think this is the right approach.  The duplication of code
is actually desirable because it is then possible to make bug fixes to
the (formerly) common code without having to worry about breaking the
other case.  In other words, over time, the code can safely diverge.

I actually went down this path once - and was nearly finished, but at
the time I thought it might be important for both solib-svr4.c and
solib-aout.c (or perhaps we'll name it solib-sunos.c) to share
current_sos() (now called svr4_current_sos()).  But I no longer think
it's worthwhile to attempt to share current_sos() between these two
shared lib implementations; in fact, I think we may be able to simplify
current_sos() once the split is made.  Looking at the comments, it
appears that there's some SVR4-specific code that the SunOS
implementation doesn't need.  I wouldn't be at all surprised if the
reverse was also true.

Kevin


  reply	other threads:[~2001-09-21 20:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1010920205607.ZM17368@ocotillo.lan>
     [not found] ` <s3ielp1ecwc.fsf@soliton.wins.uva.nl>
2001-09-20 15:16   ` Kevin Buettner
2001-09-21 18:56 ` Andrew Cagney
2001-09-21 20:31   ` Kevin Buettner [this message]
2001-09-21 20:42     ` Andrew Cagney
2001-09-21 19:32 ` Andrew Cagney
2001-09-21 20:14   ` Kevin Buettner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1010922033121.ZM19871@ocotillo.lan \
    --to=kevinb@cygnus.com \
    --cc=ac131313@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox