llvm-6502/lib/MC
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
..
MCDisassembler [C++] Use 'nullptr'. 2014-04-24 06:44:33 +00:00
MCParser MC: adjust text section flags for WoA 2014-06-22 22:25:01 +00:00
CMakeLists.txt [ARM] [MC] Refactor the constant pool classes 2014-06-18 18:17:25 +00:00
ConstantPools.cpp [ARM] [MC] Refactor the constant pool classes 2014-06-18 18:17:25 +00:00
ELFObjectWriter.cpp Convert some assert(0) to llvm_unreachable or fold an 'if' condition into the assert. 2014-06-19 06:10:58 +00:00
LLVMBuild.txt
MachObjectWriter.cpp MachO: support N_INDR aliases in assembly files. 2014-05-30 13:22:59 +00:00
Makefile
MCAsmBackend.cpp Simplify a really complicated check for Arch == X86_64. 2014-03-11 21:22:57 +00:00
MCAsmInfo.cpp MC: add enumeration of WinEH data encoding 2014-06-11 04:19:25 +00:00
MCAsmInfoCOFF.cpp Re-commit: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call 2014-02-13 14:44:26 +00:00
MCAsmInfoDarwin.cpp MachO: actually set linker-private prefix at MC level. 2014-03-29 07:33:24 +00:00
MCAsmInfoELF.cpp Refactor the setting of PrivateGlobalPrefix. 2013-12-02 23:39:26 +00:00
MCAsmStreamer.cpp Revert "Patch by Ray Donnelly to print register names instead of numbers." 2014-06-10 20:16:36 +00:00
MCAssembler.cpp Report error for non-zero data in .bss 2014-06-22 00:33:44 +00:00
MCAtom.cpp [weak vtables] Remove a bunch of weak vtables 2013-11-19 00:57:56 +00:00
MCCodeEmitter.cpp
MCCodeGenInfo.cpp
MCContext.cpp Emit DWARF info for all code section in an assembly file 2014-06-19 15:52:37 +00:00
MCDisassembler.cpp Remove redundant symbolization support from MCDisassembler interface. 2014-04-11 20:07:58 +00:00
MCDwarf.cpp Always use a temp symbol for CIE. 2014-06-20 23:54:32 +00:00
MCELF.cpp [mc] Fix ELF st_other flag. 2013-12-05 00:34:11 +00:00
MCELFObjectTargetWriter.cpp Completely rewrite ELFObjectWriter::RecordRelocation. 2014-03-29 06:26:49 +00:00
MCELFStreamer.cpp Remove an always true argument. 2014-05-12 13:30:10 +00:00
MCExpr.cpp [mips][mips64r6] Add Relocations R_MIPS_PCHI16, R_MIPS_PCLO16 2014-05-27 14:58:51 +00:00
MCExternalSymbolizer.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-13 04:57:38 +00:00
MCFunction.cpp Use std::unique_ptr to manage MCBasicBlocks in MCFunction. 2014-04-15 04:56:29 +00:00
MCInst.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-13 04:57:38 +00:00
MCInstPrinter.cpp [MC] When MCInstPrint::printAnnotation uses a comment stream, it has to ensure 2013-10-01 19:21:24 +00:00
MCInstrAnalysis.cpp MC: Disassembled CFG reconstruction. 2013-05-24 01:07:04 +00:00
MCLabel.cpp
MCLinkerOptimizationHint.cpp [ARM64][CollectLOH] Add some comments to explain how the LOHs 2014-04-02 01:02:28 +00:00
MCMachObjectTargetWriter.cpp
MCMachOStreamer.cpp Remove an always true argument. 2014-05-12 13:30:10 +00:00
MCModule.cpp Use unique_ptr to own MCFunctions within MCModule. 2014-04-15 05:15:19 +00:00
MCModuleYAML.cpp Remove 'using std::errro_code' from lib. 2014-06-13 02:24:39 +00:00
MCNullStreamer.cpp MCNullStreamer: assign file IDs to resolve crashes and errors 2014-06-19 17:15:36 +00:00
MCObjectDisassembler.cpp [Modules] Make Support/Debug.h modular. This requires it to not change 2014-04-21 22:55:11 +00:00
MCObjectFileInfo.cpp MC: adjust text section flags for WoA 2014-06-22 22:25:01 +00:00
MCObjectStreamer.cpp Move EH/Debug frame handling to the object streamer. 2014-05-12 14:02:44 +00:00
MCObjectSymbolizer.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-13 04:57:38 +00:00
MCObjectWriter.cpp
MCRegisterInfo.cpp Make SubRegIndex size mandatory, following r183020. 2013-05-31 23:45:26 +00:00
MCRelocationInfo.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-13 04:57:38 +00:00
MCSection.cpp
MCSectionCOFF.cpp Fix a few issues with comdat handling on COFF. 2014-06-06 19:26:12 +00:00
MCSectionELF.cpp Remove AllowQuotesInName and friends from MCAsmInfo. 2013-11-13 14:01:59 +00:00
MCSectionMachO.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-13 04:57:38 +00:00
MCStreamer.cpp Revert r211399, "Generate native unwind info on Win64" 2014-06-22 22:00:56 +00:00
MCSubtargetInfo.cpp ArrayRef-ize the Feature and Processor tables for SubtargetFeatures. 2014-05-06 20:23:04 +00:00
MCSymbol.cpp Revert "Add back r203962, r204028 and r204059." 2014-03-19 00:13:43 +00:00
MCSymbolizer.cpp Move MCSymbolizer's constructor into header. It's trivial - there's no need for 2014-03-27 02:42:52 +00:00
MCTargetOptions.cpp Move -dwarf-version to an MC level command line option so it's 2014-06-19 06:22:08 +00:00
MCValue.cpp Fix pr19645. 2014-05-03 19:57:04 +00:00
MCWin64EH.cpp Fix alignment of unwind data. 2013-09-15 18:01:09 +00:00
SubtargetFeature.cpp Make the split function use StringRef::split. 2014-05-13 19:55:17 +00:00
WinCOFFObjectWriter.cpp MC: prevent early DCE of empty sections 2014-06-06 21:40:16 +00:00
WinCOFFStreamer.cpp MC: formalise some assertions into proper errors 2014-05-22 02:18:10 +00:00