This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Committed] Fix for PR target/28427
- From: Danny Smith <dannysmith at clear dot net dot nz>
- To: GCC-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 20 Jul 2006 20:19:22 +1200
- Subject: [Committed] Fix for PR target/28427
config/i386/i386.c: ix86_data_alignment uses the magic number 256 as
max_align
(except with -Os). However, MAX_OFILE_ALIGNMENT defaulted to
BIGGEST_ALIGNMENT
on windows32 targets.
The PE COFF spec (and native compiler) indicate that the
max user specified alignement in 8192 bytes.
2006-07-21 Danny Smith <dannysmith@users.sourceforge.net>
PR target/28427
* config/i386/cygming.h (MAX_OFILE_ALIGNMENT): Define.
Index: config/i386/cygming.h
===================================================================
--- config/i386/cygming.h (revision 115609)
+++ config/i386/cygming.h (working copy)
@@ -310,6 +310,16 @@
#undef BIGGEST_ALIGNMENT
#define BIGGEST_ALIGNMENT 128
+/* Biggest alignment supported by the object file format of this
+ machine. Use this macro to limit the alignment which can be
+ specified using the `__attribute__ ((aligned (N)))' construct. If
+ not defined, the default value is `BIGGEST_ALIGNMENT'. */
+#undef MAX_OFILE_ALIGNMENT
+/* IMAGE_SCN_ALIGN_8192BYTES is the largest section alignment flag
+ specified in the PECOFF60 spec. Native MS compiler also limits
+ user-specified alignment to 8192 bytes. */
+#define MAX_OFILE_ALIGNMENT (8192 * 8)
+
/* Native complier aligns internal doubles in structures on dword
boundaries. */
#undef BIGGEST_FIELD_ALIGNMENT
#define BIGGEST_FIELD_ALIGNMENT 64