summaryrefslogtreecommitdiffstats
path: root/lld/lib
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2014-07-10 21:43:19 +0000
committerRui Ueyama <ruiu@google.com>2014-07-10 21:43:19 +0000
commit8cb0f1e3c0cc762985281ae1914887ef0d791bc2 (patch)
tree8dde42c9450ef5aa817c0bfa44be520542b20be9 /lld/lib
parent95b83e917e40bafd7e5bf0a4cdc592745b3b1fcc (diff)
downloadbcm5719-llvm-8cb0f1e3c0cc762985281ae1914887ef0d791bc2.tar.gz
bcm5719-llvm-8cb0f1e3c0cc762985281ae1914887ef0d791bc2.zip
[PECOFF] Set resource table entry in header.
The resource table entry should have the RVA of the embedded resource file. llvm-svn: 212765
Diffstat (limited to 'lld/lib')
-rw-r--r--lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp b/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
index 83fbaa99446..65ab03f4c24 100644
--- a/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
+++ b/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
@@ -981,6 +981,9 @@ void PECOFFWriter::build(const File &linkedFile) {
if (section->getSectionName() == ".pdata")
dataDirectory->setField(DataDirectoryIndex::EXCEPTION_TABLE,
section->getVirtualAddress(), section->size());
+ if (section->getSectionName() == ".rsrc")
+ dataDirectory->setField(DataDirectoryIndex::RESOURCE_TABLE,
+ section->getVirtualAddress(), section->size());
if (section->getSectionName() == ".idata.a")
dataDirectory->setField(DataDirectoryIndex::IAT,
section->getVirtualAddress(), section->size());
OpenPOWER on IntegriCloud