forked from OSchip/llvm-project
COFF: Do not use VirtualSize section header field for directive sections.
Looks like clang-cl sets a bogus value to the field, which makes getSectionContents() to truncate section contents. This patch directly uses SizeOfRawData field instead of VirtualSize to see if this can make buildbot green. llvm-svn: 241386
This commit is contained in:
parent
3126c6c565
commit
cffbe7cb55
|
@ -136,7 +136,8 @@ std::error_code ObjectFile::initializeChunks() {
|
|||
if (Name == ".drectve") {
|
||||
ArrayRef<uint8_t> Data;
|
||||
COFFObj->getSectionContents(Sec, Data);
|
||||
Directives = std::string((const char *)Data.data(), Data.size());
|
||||
Directives = std::string((const char *)Data.data(),
|
||||
Sec->SizeOfRawData);
|
||||
continue;
|
||||
}
|
||||
if (Name.startswith(".debug"))
|
||||
|
|
Loading…
Reference in New Issue