<div dir="ltr"><div>Greetings, LLVM developers.</div><div><br></div><div>I am trying to save the bitcode for multiple modules so that I can reload them later and add them to my Orc-based JIT.<br></div><div><br></div><div>If I save each module to its own file, I have no problem. But I would like to save them to a single file. When I do that, I sometimes get duplicate symbol definitions when I reload the modules:</div><div><br></div><div>    Duplicate definition of symbol '$./path/to/my/file.bc.__inits.0'</div><div><br></div><div>It looks to me as though this is a problem with static constructors in the modules, as though each module puts its constructors in a symbol with the same name...?</div><div><br></div><div>Does anybody have a better idea than I am of what is going on, or how to solve this?</div><div><br></div><div>I am using the 11.x release branch on Linux, FWIW. To reload the modules, I use a call to getBitcodeModuleList(), followed by calls to BitcodeModule::parseModule(), and finally calls to orc::LLJIT::addIRModule().<br></div><div><br></div><div>Geoff<br></div></div>