summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.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/CodeGen/AsmPrinter/WinCodeViewLineTables.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/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp b/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp
index 6a5c431d4fd..b3fa2d56828 100644
--- a/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp
@@ -166,6 +166,8 @@ void WinCodeViewLineTables::emitDebugInfoForFunction(const Function *GV) {
// Identify the function this subsection is for.
Asm->OutStreamer.EmitCOFFSecRel32(Fn);
Asm->OutStreamer.EmitCOFFSectionIndex(Fn);
+ // Insert padding after a 16-bit section index.
+ Asm->EmitInt16(0);
// Length of the function's code, in bytes.
EmitLabelDiff(Asm->OutStreamer, Fn, FI.End);
OpenPOWER on IntegriCloud