summaryrefslogtreecommitdiffstats
path: root/lld/COFF/Writer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/COFF/Writer.cpp')
-rw-r--r--lld/COFF/Writer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lld/COFF/Writer.cpp b/lld/COFF/Writer.cpp
index 2cc1b35fee2..96d31ab1033 100644
--- a/lld/COFF/Writer.cpp
+++ b/lld/COFF/Writer.cpp
@@ -65,8 +65,9 @@ public:
D->Type = COFF::IMAGE_DEBUG_TYPE_CODEVIEW;
D->SizeOfData = Record->getSize();
D->AddressOfRawData = Record->getRVA();
- // TODO(compnerd) get the file offset
- D->PointerToRawData = 0;
+ OutputSection *OS = Record->getOutputSection();
+ uint64_t Offs = OS->getFileOff() + (Record->getRVA() - OS->getRVA());
+ D->PointerToRawData = Offs;
++D;
}
OpenPOWER on IntegriCloud