[gnustep-objc] Make the GNUstep v2 ABI work for Windows DLLs.
authorDavid Chisnall <csdavec@swan.ac.uk>
Sun, 31 Mar 2019 11:22:33 +0000 (11:22 +0000)
committerDavid Chisnall <csdavec@swan.ac.uk>
Sun, 31 Mar 2019 11:22:33 +0000 (11:22 +0000)
commit7b36a86431e2677bdcc3d62fa7e6ab0f8f1db237
treee0fbc631f5864cf66544aa32f44d87f1e065f9e1
parent17d429535984588410f45b48f754f267fa1754a5
[gnustep-objc] Make the GNUstep v2 ABI work for Windows DLLs.

Summary:
Based on a patch by Dustin Howett, modified to not change the ABI for
ELF platforms.

Use more Windows-like section names.

This also makes things more readable by PE/COFF debug tools that assume
sections fit in the first header.

With these changes in, it is now possible to build a working WinObjC
with clang and the WinObjC version of GNUstep libobjc (upstream GNUstep
libobjc + a work around for incremental linking, which can be removed
once LINK.EXE gains a feature to opt sections out of receiving extra
padding during an incremental link).

Patch by Dustin Howett!

Reviewers: DHowett-MSFT

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D58724

llvm-svn: 357364
clang/lib/CodeGen/CGObjCGNU.cpp
clang/test/CodeGenObjC/gnu-init.m