diff options
author | Rui Ueyama <ruiu@google.com> | 2014-07-10 21:43:19 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2014-07-10 21:43:19 +0000 |
commit | 8cb0f1e3c0cc762985281ae1914887ef0d791bc2 (patch) | |
tree | 8dde42c9450ef5aa817c0bfa44be520542b20be9 /lld/lib | |
parent | 95b83e917e40bafd7e5bf0a4cdc592745b3b1fcc (diff) | |
download | bcm5719-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.cpp | 3 |
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()); |