llvm-6502/lib/MC
David Majnemer 31b080d57f MC: Support aligned COMMON symbols for COFF
link.exe:
Fuzz testing has shown that COMMON symbols with size > 32 will always
have an alignment of at least 32 and all symbols with size < 32 will
have an alignment of at least the largest power of 2 less than the size
of the symbol.

binutils:
The BFD linker essentially work like the link.exe behavior but with
alignment 4 instead of 32.  The BFD linker also supports an extension to
COFF which adds an -aligncomm argument to the .drectve section which
permits specifying a precise alignment for a variable but MC currently
doesn't support editing .drectve in this way.

With all of this in mind, we decide to play a little trick: we can
ensure that the alignment will be respected by bumping the size of the
global to it's alignment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218201 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-21 09:18:07 +00:00
..
MCDisassembler Change MCSchedModel to be a struct of statically initialized data. 2014-09-02 17:43:54 +00:00
MCParser Fix left shifts by too large exponents in MCParser 2014-09-02 17:25:29 +00:00
CMakeLists.txt Nuke MCAnalysis. 2014-09-02 22:32:20 +00:00
ConstantPools.cpp Fix build failure on windows 2014-07-18 16:41:58 +00:00
ELFObjectWriter.cpp Elide unnecessary DenseMap copy. 2014-09-19 12:26:38 +00:00
LLVMBuild.txt Nuke MCAnalysis. 2014-09-02 22:32:20 +00:00
MachObjectWriter.cpp If available, pass down the Fixup object to EvaluateAsRelocatable. 2014-08-10 11:35:12 +00:00
Makefile Nuke MCAnalysis. 2014-09-02 22:32:20 +00:00
MCAsmBackend.cpp
MCAsmInfo.cpp MC: remove unnecessary enumeration prefix 2014-09-01 23:48:29 +00:00
MCAsmInfoCOFF.cpp Remove HasLEB128. 2014-08-15 14:01:07 +00:00
MCAsmInfoDarwin.cpp
MCAsmInfoELF.cpp
MCAsmStreamer.cpp MC Win64: Put unwind info for COMDAT code into the same COMDAT group 2014-09-04 17:42:03 +00:00
MCAssembler.cpp Add and update reset() and doInitialization() methods to MC* and passes. 2014-09-17 09:25:36 +00:00
MCCodeEmitter.cpp
MCCodeGenInfo.cpp
MCContext.cpp Add and update reset() and doInitialization() methods to MC* and passes. 2014-09-17 09:25:36 +00:00
MCDwarf.cpp MC: correct DWARF line info for PE/COFF 2014-09-06 19:57:48 +00:00
MCELF.cpp [MC] Constify MCELF::GetVisibility and MCELF::getOther 2014-07-11 17:34:44 +00:00
MCELFObjectTargetWriter.cpp [MC] Pass MCSymbolData to needsRelocateWithSymbol 2014-07-20 23:15:06 +00:00
MCELFStreamer.cpp
MCExpr.cpp Add a helper to MCExpr for when an expression is know to be absolute. 2014-08-15 14:20:32 +00:00
MCInst.cpp
MCInstPrinter.cpp
MCInstrAnalysis.cpp
MCLabel.cpp
MCLinkerOptimizationHint.cpp
MCMachObjectTargetWriter.cpp
MCMachOStreamer.cpp Add and update reset() and doInitialization() methods to MC* and passes. 2014-09-17 09:25:36 +00:00
MCNullStreamer.cpp
MCObjectFileInfo.cpp MC: Support aligned COMMON symbols for COFF 2014-09-21 09:18:07 +00:00
MCObjectStreamer.cpp Make EmitDwarfSetLineAddr an static helper. NFC. 2014-08-15 14:43:02 +00:00
MCObjectWriter.cpp
MCRegisterInfo.cpp
MCSection.cpp
MCSectionCOFF.cpp MC: Fix MCSectionCOFF::PrintSwitchToSection 2014-09-20 20:40:50 +00:00
MCSectionELF.cpp
MCSectionMachO.cpp
MCStreamer.cpp Another required re-setting for MCStreamer::reset(). 2014-09-17 17:50:34 +00:00
MCSubtargetInfo.cpp Change MCSchedModel to be a struct of statically initialized data. 2014-09-02 17:43:54 +00:00
MCSymbol.cpp
MCSymbolizer.cpp
MCTargetOptions.cpp Convert MC command line option for fatal assembler warnings into a 2014-08-26 18:39:50 +00:00
MCValue.cpp
MCWin64EH.cpp MC Win64: Put unwind info for COMDAT code into the same COMDAT group 2014-09-04 17:42:03 +00:00
MCWinEH.cpp MC Win64: Put unwind info for COMDAT code into the same COMDAT group 2014-09-04 17:42:03 +00:00
StringTableBuilder.cpp Invert the MC -> Object dependency. 2014-07-03 02:01:39 +00:00
SubtargetFeature.cpp Fix some cases where StringRef was being passed by const reference. Remove const from some other StringRefs since its implicitly const already. 2014-08-30 16:48:02 +00:00
WinCOFFObjectWriter.cpp This add a reset method for WinCOFFObjectWriter, like other MC* classes. 2014-09-16 21:31:04 +00:00
WinCOFFStreamer.cpp MC: Support aligned COMMON symbols for COFF 2014-09-21 09:18:07 +00:00
YAML.cpp Invert the MC -> Object dependency. 2014-07-03 02:01:39 +00:00