diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-04-08 22:33:40 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-04-08 22:33:40 +0000 |
commit | a9bdb32f045fefc4d750c941ed4dbd436475367a (patch) | |
tree | f6327019c8493746f65e2fd7e3d61347fe7469d7 /llvm/lib/MC/MCObjectFileInfo.cpp | |
parent | c3b18967ed07d939e70564882806c9729f67637d (diff) | |
download | bcm5719-llvm-a9bdb32f045fefc4d750c941ed4dbd436475367a.tar.gz bcm5719-llvm-a9bdb32f045fefc4d750c941ed4dbd436475367a.zip |
WinCOFF: Emit common symbols as specified in the COFF spec
Summary:
Local common symbols were properly inserted into the .bss section.
However, putting external common symbols in the .bss section would give
them a strong definition.
Instead, encode them as undefined, external symbols who's symbol value
is equivalent to their size.
Reviewers: Bigcheese, rafael, rnk
CC: llvm-commits
Differential Revision: http://reviews.llvm.org/D3324
llvm-svn: 205811
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r-- | llvm/lib/MC/MCObjectFileInfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index 3b011c8bc5a..75147bfb489 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -548,6 +548,10 @@ void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) { void MCObjectFileInfo::InitCOFFMCObjectFileInfo(Triple T) { + // The object file format cannot represent common symbols with explicit + // alignments. + CommDirectiveSupportsAlignment = false; + // COFF BSSSection = Ctx->getCOFFSection(".bss", |