This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]