public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Bob Wilson <bwilson@tensilica.com>
To: Alan Modra <amodra@bigpond.net.au>
Cc: binutils@sources.redhat.com
Subject: Re: possible BFD regression from a change made last September
Date: Wed, 18 May 2005 17:12:00 -0000	[thread overview]
Message-ID: <428B6C61.4060200@tensilica.com> (raw)
In-Reply-To: <20050518001540.GP27573@bubble.grove.modra.org>

Alan Modra wrote:
> On Tue, May 17, 2005 at 10:15:32AM -0700, Bob Wilson wrote:
> 
>>If the page size is not 1, I can see how this case is now handled by:
>>
>>		  /* The section VMA must equal the file position
>>		     modulo the page size.  */
>>		  bfd_size_type page = align;
>>		  if ((abfd->flags & D_PAGED) != 0)
>>		    page = bed->maxpagesize;
>>		  adjust = vma_page_aligned_bias (sec->vma,
>>						  p->p_vaddr + p->p_memsz,
>>						  page);
>>		  p->p_memsz += adjust;
>>
>>but that breaks in my scenario where align == 16 but maxpagesize == 1.
> 
> 
> We ought to be taking the maximum of align and maxpagesize.  I think the
> following should do the trick.
> 
> 	* elf.c (assign_file_positions_for_segments): Use maximum of
> 	maxpagesize and section alignment when adjusting initial
> 	segment offset and section offsets.

Yes, indeed, that fixes it.  Thanks for the patch!

--Bob

      reply	other threads:[~2005-05-18 16:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-17 17:19 Bob Wilson
2005-05-18  1:31 ` Alan Modra
2005-05-18 17:12   ` Bob Wilson [this message]

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=428B6C61.4060200@tensilica.com \
    --to=bwilson@tensilica.com \
    --cc=amodra@bigpond.net.au \
    --cc=binutils@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).