[PATCH] D30080: MC/COFF: Do not emit forward associative section referenceds.

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 16 21:33:30 PST 2017


I believe its possible via LLVM IR, I don't think it'd be too hard to make
it work.

On Thu, Feb 16, 2017 at 6:53 PM, Rui Ueyama <ruiu at google.com> wrote:

> On Thu, Feb 16, 2017 at 6:49 PM, David Majnemer <david.majnemer at gmail.com>
> wrote:
>
>> Does MSCOFF permit chains of associated sections? I can't remember if
>> they do.
>>
>
> IIRC that is not explicitly banned by the spec, but no one produces
> chained associated sections, and I can't imagine a valid of use it.
>
>
>> On Thu, Feb 16, 2017 at 6:35 PM Rui Ueyama via Phabricator via
>> llvm-commits <llvm-commits at lists.llvm.org> wrote:
>>
>>> ruiu created this revision.
>>>
>>> MSVC link.exe cannot handle associative sections that refer later
>>> sections in the section header. Technically, such COFF object doesn't
>>> violate the Microsoft COFF spec, as the spec doesn't say anything
>>> about that, but still we should avoid doing that to make it compatible
>>> with MS tools.
>>>
>>> This patch assigns smaller section numbers to non-associative sections
>>> and larger numbers to associative sections. This should resolve the
>>> compatibility issue.
>>>
>>>
>>> https://reviews.llvm.org/D30080
>>>
>>> Files:
>>>   llvm/lib/MC/WinCOFFObjectWriter.cpp
>>>   llvm/test/DebugInfo/COFF/globals.ll
>>>   llvm/test/DebugInfo/COFF/types-data-members.ll
>>>   llvm/test/MC/COFF/section-comdat.s
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170216/6d715c38/attachment.html>


More information about the llvm-commits mailing list