Fix COFF section index relocation should be 16 bits, not 32

Original patch by Andrey Guskov!
http://reviews.llvm.org/D5651

llvm-svn: 219327
This commit is contained in:
Timur Iskhodzhanov
2014-10-08 18:01:49 +00:00
parent 0bc6d5f97d
commit 5fcaeebb72
7 changed files with 17 additions and 1 deletions

View File

@@ -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);