diff options
| author | Rui Ueyama <ruiu@google.com> | 2013-07-26 16:59:38 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2013-07-26 16:59:38 +0000 |
| commit | b37fba7c54bd83ea0198c13433a1eba32401850d (patch) | |
| tree | 68919149a904db6a7c52ead03343e816462aceb4 | |
| parent | e33d4afa47a4562ffc9c50f777b2e76e5be2ab56 (diff) | |
| download | bcm5719-llvm-b37fba7c54bd83ea0198c13433a1eba32401850d.tar.gz bcm5719-llvm-b37fba7c54bd83ea0198c13433a1eba32401850d.zip | |
[PECOFF] Ignore sections with IMAGE_SCN_LNK_REMOVE attribute.
llvm-svn: 187211
| -rw-r--r-- | lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp b/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp index 110889ceb22..ef29769a7cf 100644 --- a/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp +++ b/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp @@ -200,6 +200,11 @@ private: if (sectionName == ".debug$S") return error_code::success(); + // A section with IMAGE_SCN_LNK_REMOVE attribute will never become + // a part of the output image. That's what the COFF spec says. + if (section->Characteristics & llvm::COFF::IMAGE_SCN_LNK_REMOVE) + return error_code::success(); + // Create an atom for the entire section. if (symbols.empty()) { ArrayRef<uint8_t> Data(SecData.data(), SecData.size()); |

