[BFD PATCH] section alignment when reading core files

Roland McGrath roland@redhat.com
Thu Oct 16 18:40:00 GMT 2003


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;



More information about the Binutils mailing list