Index: llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp =================================================================== --- llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp +++ llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp @@ -357,6 +357,9 @@ if (SecRef.sh_type == ELF::SHT_SYMTAB) // TODO: Dynamic? SymTab = SecRef; + } else { + auto §ion = G->createSection(*Name, Prot); + G->createZeroFillBlock(section,Size,Address,Alignment,0); } } @@ -480,7 +483,7 @@ return Name.takeError(); auto Section = G->findSectionByName(*Name); if (!Section) - return make_error("Could not find a section", + return make_error("Could not find the section "+*Name, llvm::inconvertibleErrorCode()); // we only have one for now auto blocks = Section->blocks(); @@ -527,7 +530,7 @@ auto JitSection = G->findSectionByName(*sectName); if (!JitSection) return make_error( - "Could not find a section", llvm::inconvertibleErrorCode()); + "Could not find the JitSection "+*sectName, llvm::inconvertibleErrorCode()); auto bs = JitSection->blocks(); if (bs.empty()) return make_error(