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

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219327 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Timur Iskhodzhanov
2014-10-08 18:01:49 +00:00
parent 8e5fbd755f
commit 0a5843e3b1
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);