Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: binutils@sources.redhat.com
Cc: gdb-patches@sources.redhat.com
Subject: [BFD PATCH] section alignment when reading core files
Date: Thu, 16 Oct 2003 18:40:00 -0000	[thread overview]
Message-ID: <200310161840.h9GIeofA018339@magilla.sf.frob.com> (raw)

Can I get some comment on this trivial patch?  I posted it before, and silence.
It is trivial, and I think obviously correct.

Ok to commit?


Thanks,
Roland


2003-10-07  Roland McGrath  <roland@redhat.com>

	* elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
	new section from p_align header field.

Index: elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.201
diff -u -b -p -r1.201 elf.c
--- elf.c	16 Oct 2003 04:11:05 -0000	1.201
+++ elf.c	16 Oct 2003 18:38:48 -0000
@@ -2206,6 +2206,7 @@ _bfd_elf_make_section_from_phdr (bfd *ab
   newsect->_raw_size = hdr->p_filesz;
   newsect->filepos = hdr->p_offset;
   newsect->flags |= SEC_HAS_CONTENTS;
+  newsect->alignment_power = bfd_log2 (hdr->p_align);
   if (hdr->p_type == PT_LOAD)
     {
       newsect->flags |= SEC_ALLOC;


             reply	other threads:[~2003-10-16 18:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-16 18:40 Roland McGrath [this message]
2003-10-16 18:51 ` H. J. Lu
2003-10-16 18:54   ` Roland McGrath

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=200310161840.h9GIeofA018339@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=binutils@sources.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