Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFA] fix build failure in solib-som.c
Date: Wed, 08 Aug 2007 17:50:00 -0000	[thread overview]
Message-ID: <20070808105024.26610da9@ironwood.lan> (raw)
In-Reply-To: <20070808174437.GB3738@adacore.com>

On Wed, 8 Aug 2007 10:44:37 -0700
Joel Brobecker <brobecker@adacore.com> wrote:

> Hi Kevin,
> 
> > > > > 2007-08-07  Joel Brobecker  <brobecker@adacore.com>
> > > > > 
> > > > >         * solib-som.c (som_relocate_section_addresses): Stop saving
> > > > >         the $CODE$ section in the so_list structure.
> > > > > 
> > > > > This files compiles fine again after this change is applied.
> > > > > 
> > > > > Would that be OK to apply?
> > > > 
> > > > I think it would be better to revise the code to set so->addr_low and
> > > > so->addr_high to sec->addr and sec->endaddr respectively.  You'll also
> > > > have to move this block of code to the end of the function.
> > > 
> > > Isn't that already done in som_current_sos, though?
> > 
> > It is, but those addresses won't be relocated.  In order to be
> > consistent with the other ports, I think these values should be
> > relocated.  Note that solib.c's solib_map_sections() sets `addr_low'
> > and `addr_high' for .text after the relocation has been done.  Clearly
> > this won't work for SOM since the .text section is named differently. 
> > However, given that `addr_low' and `addr_high' are set after the
> > relocation has been performed (for other ports with a .text), I think
> > it makes sense to arrange the SOM-specific code as suggested in my
> > earlier reply.  I'm beginning to think too that the assignments to
> > addr_low and addr_high ought to be removed from som_current_sos().
> 
> I had a closer look. I don't think we need to relocate the addr_low
> and addr_high addresses, because they were extracted from the load
> map info (which I would imagine would contain already relocated
> addresses). This is in som_current_sos.

Ah, okay.

> This is only by luck, but it looks like my original patch still
> makes sense, no? I did a quick test by running any program, and
> doing a "info sharedlibrary", and it looks likes the addresses
> are indeed relocated (they don't correspond to the $CODE$ or $TEXT$
> addresses printed by objdump).

Sounds good.  Go ahead and check in your original patch.

Kevin


  reply	other threads:[~2007-08-08 17:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-07 20:42 Joel Brobecker
2007-08-07 21:47 ` Kevin Buettner
2007-08-07 22:40   ` Joel Brobecker
2007-08-07 23:20     ` Kevin Buettner
2007-08-08 17:41       ` Joel Brobecker
2007-08-08 17:50         ` Kevin Buettner [this message]
2007-08-09 16:47           ` Joel Brobecker

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=20070808105024.26610da9@ironwood.lan \
    --to=kevinb@redhat.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