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

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 16 18:35:01 PST 2017


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30080.88837.patch
Type: text/x-patch
Size: 6356 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170217/fcb417c8/attachment.bin>


More information about the llvm-commits mailing list