summaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-10-16 18:55:48 +0000
committerRoland McGrath <roland@gnu.org>2003-10-16 18:55:48 +0000
commit911b35d361bb634128b5dd69d8dc3d8f031fefb7 (patch)
treed50a9e39819a206c47c84727b1158e41ae1d66e1 /bfd/elf.c
parentd631a80438c01b3084c6afa05ad0ea6e3d0c196d (diff)
downloadgdb-911b35d361bb634128b5dd69d8dc3d8f031fefb7.tar.gz
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.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 2d66ced8d44..417fd50beb4 100644
--- 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;