[lld] [LLD][COFF] Add support for custom DOS stub (PR #122561)
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 17 04:33:22 PST 2025
================
@@ -246,6 +246,22 @@ void LinkerDriver::parseAligncomm(StringRef s) {
std::max(ctx.config.alignComm[std::string(name)], 1 << v);
}
+void LinkerDriver::parseDosStub(StringRef path) {
+ std::unique_ptr<MemoryBuffer> stub =
+ CHECK(MemoryBuffer::getFile(path), "could not open " + path);
+ size_t bufferSize = stub->getBufferSize();
+ const char *bufferStart = stub->getBufferStart();
+ // MS link.exe compatibility:
+ // 1. stub must greater than or equal to 64 bytes
----------------
zmodem wrote:
I didn't mean for you to remove "be" on this line though :)
https://github.com/llvm/llvm-project/pull/122561
More information about the llvm-commits
mailing list