Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: gdb-patches@sourceware.org
Subject: Re: RFC: Fix an infinite loop placing sections in relocatable objects
Date: Thu, 16 Feb 2006 22:17:00 -0000	[thread overview]
Message-ID: <20060216221726.GA1137@nevyn.them.org> (raw)
In-Reply-To: <jeu0az7yfk.fsf@sykes.suse.de>

On Thu, Feb 16, 2006 at 11:04:31PM +0100, Andreas Schwab wrote:
> Daniel Jacobowitz <drow@false.org> writes:
> 
> > diff -u -p -r1.167 symfile.c
> > --- symfile.c	7 Feb 2006 19:40:30 -0000	1.167
> > +++ symfile.c	16 Feb 2006 15:21:43 -0000
> > @@ -476,6 +476,7 @@ place_section (bfd *abfd, asection *sect
> >    struct place_section_arg *arg = obj;
> >    CORE_ADDR *offsets = arg->offsets->offsets, start_addr;
> >    int done;
> > +  ULONGEST align = 1 << bfd_get_section_alignment (abfd, sect);
> 
> I think bfd_get_section_alignment can return values bigger than 31 in
> general, and this is undefined in this case.

It's only used in math with a CORE_ADDR, which will be the size of a
bfd_vma.  Can bfd_get_section_alignment return a shift greater than the
size of a bfd_vma?  What would that mean?

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-02-16 22:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-16 15:24 Daniel Jacobowitz
2006-02-16 19:16 ` Jim Blandy
2006-02-16 22:04 ` Andreas Schwab
2006-02-16 22:17   ` Daniel Jacobowitz [this message]
2006-02-16 22:23     ` Jim Blandy
2006-02-16 22:24       ` Daniel Jacobowitz
2006-02-20 15:03 ` Daniel Jacobowitz

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=20060216221726.GA1137@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    /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