llvm/lib
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
..
Analysis Add file to CMake build as well. 2014-09-18 00:39:20 +00:00
AsmParser Make CallingConv::ID an alias of "unsigned". 2014-09-10 18:00:17 +00:00
Bitcode Eliminating static destructor for the BitCodeErrorCategory by converting to a ManagedStatic. 2014-09-19 20:29:02 +00:00
CodeGen mop up: "Don’t duplicate function or class name at the beginning of the comment." 2014-09-20 22:39:16 +00:00
DebugInfo Turn local DWARFContext helpers getFileNameForUnit() and getFileLineInfoForCompileUnit() into full-blowm DWARFDebugLine::LineTable methods. 2014-09-19 15:11:51 +00:00
ExecutionEngine RTDyldMemoryManager::getSymbolAddress(): Make sure to return 0 if symbol name is not met. [-Wreturn-type] 2014-09-20 23:58:13 +00:00
IR DIBuilder: Delete dead code, NFC 2014-09-19 23:17:58 +00:00
IRReader Pass a && to getLazyBitcodeModule. 2014-09-03 17:31:46 +00:00
LineEditor [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
Linker Merge alignment of common GlobalValue. 2014-09-09 17:48:18 +00:00
LTO LTO: introduce object file-based on-disk module format. 2014-09-18 21:28:49 +00:00
MC MC: Support aligned COMMON symbols for COFF 2014-09-21 09:18:07 +00:00
Object Converting object's error_category to a ManagedStatic to avoid static constructors and destructors. 2014-09-19 22:09:18 +00:00
Option Add an overload of getLastArgNoClaim taking two OptSpecifiers. 2014-09-12 19:42:53 +00:00
ProfileData llvm-cov: Allow creating CoverageMappings from filenames 2014-09-20 17:19:52 +00:00
Support Add hsail and amdil64 to Triple 2014-09-19 19:52:11 +00:00
TableGen [TableGen] Fully resolve class-instance values before defs in multiclasses 2014-09-16 17:14:13 +00:00
Target [x86] Teach the new vector shuffle lowering to use VPERMILPD for 2014-09-20 22:09:27 +00:00
Transforms Using a deque to manage the stack of nodes is faster here. 2014-09-20 13:29:20 +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