Bug 5226 - PE-COFF targets fail to set section alignment flags correctly
Summary: PE-COFF targets fail to set section alignment flags correctly
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.19
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-27 23:34 UTC by Danny Smith
Modified: 2007-11-04 23:51 UTC (History)
1 user (show)

See Also:
Host: i686-pc-mingw32
Target:
Build: i686-pc-mingw32
Last reconfirmed:


Attachments
Testcase for large alignment (826 bytes, text/plain)
2007-10-29 01:07 UTC, Danny Smith
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Danny Smith 2007-10-27 23:34:06 UTC
Given an alignment >16-bytes, eg

	.file	"foo.c"
	.data
.globl _x
	.align 32
_x:
	.long	1065353216
	.space 28

gas for PE-COFF targets fails to set section alignment flags correctly,
but always uses default.  So

 as foo.s | objdump -x  gives

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         00000000  00000000  00000000  00000000  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .data         00000020  00000000  00000000  0000008c  2**4 < should be 2**5
                  ALLOC, LOAD, DATA
  2 .bss          00000000  00000000  00000000  00000000  2**4
                  ALLOC


Nor is there any warning that alignment is being set to default.

A patch for this bug has already been submitted at
http://sourceware.org/ml/binutils/2007-10/msg00325.html
Comment 1 Danny Smith 2007-10-29 01:07:29 UTC
Created attachment 2063 [details]
Testcase for large alignment
Comment 2 Danny Smith 2007-11-04 23:01:26 UTC
An updated patch for this bug has been submitted at
http://sourceware.org/ml/binutils/2007-11/msg00027.html