This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[BFD PATCH] section alignment when reading core files
- From: Roland McGrath <roland at redhat dot com>
- To: binutils at sources dot redhat dot com
- Cc: gdb-patches at sources dot redhat dot com
- Date: Thu, 16 Oct 2003 11:40:50 -0700
- Subject: [BFD PATCH] section alignment when reading core files
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;