diff options
author | LIU Hao <lh_mouse@126.com> | 2025-03-29 22:47:54 +0800 |
---|---|---|
committer | Jonathan Yong <10walls@gmail.com> | 2025-03-30 02:45:21 +0000 |
commit | 8d42378acdf1a011420ba78685f7a6c79808c881 (patch) | |
tree | 351ee80e3dc9ef67084ae57bc3e4f66f2c6b817c /gcc | |
parent | cc63163f0a17f80b2bee1b174197793d163680c1 (diff) | |
download | gcc-8d42378acdf1a011420ba78685f7a6c79808c881.zip gcc-8d42378acdf1a011420ba78685f7a6c79808c881.tar.gz gcc-8d42378acdf1a011420ba78685f7a6c79808c881.tar.bz2 |
gcc/mingw: Align `.refptr.` to 8-byte boundaries for 64-bit targets
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`.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/mingw/winnt.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/config/mingw/winnt.cc b/gcc/config/mingw/winnt.cc index adaa6df..08a761d 100644 --- a/gcc/config/mingw/winnt.cc +++ b/gcc/config/mingw/winnt.cc @@ -819,6 +819,7 @@ mingw_pe_file_end (void) } 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); |