Calling setProcessAllSections(true) is required to make sure that all sections,
even those not marked as necessary for execution, are passed to the memory
manager.
auto ObjLinkingLayer =
std::make_unique<RTDyldObjectLinkingLayer>(
ES, std::move(GetMemMgr));
+
+ // Register the event listener.
ObjLinkingLayer->registerJITEventListener(
*JITEventListener::createGDBRegistrationListener());
+
+ // Make sure the debug info sections aren't stripped.
+ ObjLinkingLayer->setProcessAllSections(true);
+
return ObjLinkingLayer;
})
.create());