Windows only requires sections to be aligned on a 4-byte boundary. This used
to work because in binutils the `.rdata` section is over-aligned to a 16-byte
boundary, which will be fixed in the future.
This matches the output of Clang.
Signed-off-by: LIU Hao <lh_mouse@126.com>
Signed-off-by: Jonathan Yong <10walls@gmail.com>
gcc/ChangeLog:
* config/mingw/winnt.cc (mingw_pe_file_end): Add `.p2align`.
}
fprintf (asm_out_file, "\t.section\t.rdata$%s, \"dr\"\n"
+ "\t.p2align\t3, 0\n"
"\t.globl\t%s\n"
"\t.linkonce\tdiscard\n", oname, oname);
fprintf (asm_out_file, "%s:\n\t.quad\t%s\n", oname, name);