2003-10-07 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@gnu.org>
Thu, 16 Oct 2003 18:55:48 +0000 (18:55 +0000)
committerRoland McGrath <roland@gnu.org>
Thu, 16 Oct 2003 18:55:48 +0000 (18:55 +0000)
* elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
new section from p_align header field.

bfd/elf.c

index 2d66ced8d4441278551247b039f8ed91db4a060d..417fd50beb4795a2751691db88c22c9ba060d901 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -2206,6 +2206,7 @@ _bfd_elf_make_section_from_phdr (bfd *abfd,
   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;