[compiler-rt] [llvm] [ORC][Runtime] Enhancing ELF Platform with Push-Request Model for Initializers (PR #102846)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 11 21:03:18 PDT 2024
SahilPatidar wrote:
@lhames If I add `if (!IsBootstrapping)` around `addDSOHandleSupportPasses` and `registerInitSections` in `modifyConfig`, it works as well, so there's no need to track anything. However, we'll have to add this code; otherwise, it will give an "unrecognized header" error while registering initializers. If you think this approach is correct, I'll remove the tracking.
```cpp
ELFNixPlatformRuntimeState::PerJITDylibState *
ELFNixPlatformRuntimeState::getJITDylibStateByHeaderAddr(void *DSOHandle) {
auto I = JDStates.find(DSOHandle);
if (I == JDStates.end()) {
I = JDStates.insert(std::make_pair(DSOHandle, JITDylibState())).first;
I->second.Header = DSOHandle;
}
return &I->second;
}
```
If we don't do this, then we can't add the deregister call in `addDSOHandleSupportPasses` and `registerInitSections`.
https://github.com/llvm/llvm-project/pull/102846
More information about the llvm-commits
mailing list