llvm-6502/lib
Saleem Abdulrasool 7a3698ecc9 MC: adjust text section flags for WoA
Correct the section flags for code built for Windows on ARM with
`-ffunction-sections`.  Windows on ARM uses solely Thumb-2 instructions, and
indicates that the function is thumb by placing it in a text section that has
IMAGE_SCN_MEM_16BIT flag set.

When we encounter a .section directive, a new section is constructed.  This may
be a text segment.  In order to identify that we need the additional flag,
expose the target triple through the ObjectFileInfo as this information is lost
otherwise.

Since any modern ARM targeting environment on Windows would be Thumb-2 (Windows
ARM NT or Windows Embedded Compact), introducing a new flag to indicate the
section attribute seems to be a bit overkill.  Simply depend on the target
triple.  Since there is one location that this information is currently needed,
creating a target specific assembly parser and delegating the parsing of section
switches also feels a bit heavy handed.  If it turns out that this information
ends up changing additional behaviour, then it may be worth considering that
alternative.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211481 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-22 22:25:01 +00:00
..
Analysis SCEVExpander: Fold constant PHIs harder. The logic below only understands proper IVs. 2014-06-21 11:47:18 +00:00
AsmParser IR: add "cmpxchg weak" variant to support permitted failure. 2014-06-13 14:24:07 +00:00
Bitcode Revert a C API difference that I incorrectly introduced. 2014-06-18 20:07:35 +00:00
CodeGen Revert r211399, "Generate native unwind info on Win64" 2014-06-22 22:00:56 +00:00
DebugInfo [DWARF parser] Use distinction between DW_AT_ranges_base and DW_AT_GNU_ranges_base instead of DWARF version 2014-06-13 22:31:03 +00:00
ExecutionEngine Revert "Replace Execution Engine's mutex with std::recursive_mutex." 2014-06-20 21:07:14 +00:00
IR Add back functionality removed in r210497. 2014-06-21 02:43:02 +00:00
IRReader Remove 'using std::errro_code' from lib. 2014-06-13 02:24:39 +00:00
LineEditor
Linker Replace some assert(0)'s with llvm_unreachable. 2014-06-18 05:05:13 +00:00
LTO Use the assignment operator. 2014-06-19 22:27:46 +00:00
MC MC: adjust text section flags for WoA 2014-06-22 22:25:01 +00:00
Object Fix a warning about the use of const being ignored with a cast. 2014-06-20 18:07:34 +00:00
Option ArgList: use MakeArgList overloads in subclasses and clean up some calls. 2014-06-20 04:36:29 +00:00
ProfileData Renaming SwapByteOrder() to getSwappedBytes() 2014-06-14 11:36:01 +00:00
Support Fix the MinGW builder. Apparently std::call_once and 2014-06-21 00:24:51 +00:00
TableGen Convert some assert(0) to llvm_unreachable or fold an 'if' condition into the assert. 2014-06-19 06:10:58 +00:00
Target Revert r211399, "Generate native unwind info on Win64" 2014-06-22 22:00:56 +00:00
Transforms LoopVectorizer: Fix a dominance issue 2014-06-22 03:38:59 +00:00
CMakeLists.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
LLVMBuild.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
Makefile ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00