summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/WinCOFFStreamer.cpp
diff options
context:
space:
mode:
authorTimur Iskhodzhanov <timurrrr@google.com>2014-10-08 18:01:49 +0000
committerTimur Iskhodzhanov <timurrrr@google.com>2014-10-08 18:01:49 +0000
commit5fcaeebb7234a27dba4bd3a8795a7afa089a3d50 (patch)
treee5949f7e53c23d58a8a12329bdef8729aee3905c /llvm/lib/MC/WinCOFFStreamer.cpp
parent0bc6d5f97dbbd7f3283e21dbe3b12f64a60922a8 (diff)
downloadbcm5719-llvm-5fcaeebb7234a27dba4bd3a8795a7afa089a3d50.tar.gz
bcm5719-llvm-5fcaeebb7234a27dba4bd3a8795a7afa089a3d50.zip
Fix COFF section index relocation should be 16 bits, not 32
Original patch by Andrey Guskov! http://reviews.llvm.org/D5651 llvm-svn: 219327
Diffstat (limited to 'llvm/lib/MC/WinCOFFStreamer.cpp')
-rw-r--r--llvm/lib/MC/WinCOFFStreamer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/WinCOFFStreamer.cpp b/llvm/lib/MC/WinCOFFStreamer.cpp
index b8d5f2a11b5..078091c1e16 100644
--- a/llvm/lib/MC/WinCOFFStreamer.cpp
+++ b/llvm/lib/MC/WinCOFFStreamer.cpp
@@ -163,7 +163,7 @@ void MCWinCOFFStreamer::EmitCOFFSectionIndex(MCSymbol const *Symbol) {
const MCSymbolRefExpr *SRE = MCSymbolRefExpr::Create(Symbol, getContext());
MCFixup Fixup = MCFixup::Create(DF->getContents().size(), SRE, FK_SecRel_2);
DF->getFixups().push_back(Fixup);
- DF->getContents().resize(DF->getContents().size() + 4, 0);
+ DF->getContents().resize(DF->getContents().size() + 2, 0);
}
void MCWinCOFFStreamer::EmitCOFFSecRel32(MCSymbol const *Symbol) {
OpenPOWER on IntegriCloud