[llvm-commits] Patch for pr9213: Emit global_ctors into MSVCRT-compatible '.CRT$XCU' section for win32 targets

David Blaikie dblaikie at gmail.com
Tue Feb 21 08:05:51 PST 2012


On Tue, Feb 21, 2012 at 5:11 AM, Aaron Ballman <aaron at aaronballman.com> wrote:
> On Tue, Feb 21, 2012 at 12:46 AM, Joe Groff <arcata at gmail.com> wrote:
>> Here's a partial fix I sent a while back for pr9213. With this patch,
>> global_ctors pointers will be generated into the '.CRT$XCU' section of
>> the COFF output file instead of '.ctors' when targeting *-*-win32, so
>> that global_ctors will be run automatically by the Microsoft CRT.
>> (MSVCRT does not support an analog to the sysv '.dtors' section, so
>> this patch does not affect global_dtors, which still will not be run
>> by the stock CRT on win32 targets.) Let me know if any changes are
>> necessary. Thanks.
>
> LGTM -- but if you can send svn diffs, that would make it easier to
> commit (at least for me).

When applying git diffs you can use patch -p1 instead of patch -p0
(though I guess you work on Windows - not sure what tools you use
there/or what their equivalent operation would be)

- David



More information about the llvm-commits mailing list