MC: fix text section characteristics for WoA
authorSaleem Abdulrasool <compnerd@compnerd.org>
Sun, 8 Jun 2014 03:57:49 +0000 (03:57 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Sun, 8 Jun 2014 03:57:49 +0000 (03:57 +0000)
commitea3ab85c01df27a4dcd1a855b4cf5f3e2bdb2791
tree706ef0a71983aef476f0acf68a69cb783719a71a
parent4a0c1d135eb8d3f1a3e71bb5aed02f59bc062125
MC: fix text section characteristics for WoA

link.exe requires that the text section has the IMAGE_SCN_MEM_16BIT flag set.
Otherwise, it will treat the function as ARM.  If this occurs, then jumps to the
function will fail, switching from thumb to ARM mode execution.

With this change, it is possible to link using the MSVC linker as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210415 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/MCObjectFileInfo.cpp
test/MC/ARM/Windows/text-attributes.s [new file with mode: 0644]