We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b31175a commit 94f34c0Copy full SHA for 94f34c0
lld/COFF/Writer.cpp
@@ -1758,16 +1758,7 @@ template <typename PEHeaderTy> void Writer::writeHeader() {
1758
assert(coffHeaderOffset == buf - buffer->getBufferStart());
1759
auto *coff = reinterpret_cast<coff_file_header *>(buf);
1760
buf += sizeof(*coff);
1761
- switch (config->machine) {
1762
- case ARM64EC:
1763
- coff->Machine = AMD64;
1764
- break;
1765
- case ARM64X:
1766
- coff->Machine = ARM64;
1767
1768
- default:
1769
- coff->Machine = config->machine;
1770
- }
+ coff->Machine = ctx.symtab.isEC() ? AMD64 : ctx.symtab.machine;
1771
coff->NumberOfSections = ctx.outputSections.size();
1772
coff->Characteristics = IMAGE_FILE_EXECUTABLE_IMAGE;
1773
if (config->largeAddressAware)
0 commit comments