[ORC][ORC-RT][MachO] Reset __data and __common sections on library close.
If we want to be able to close and then re-open a library then we need to reset the data section states when the library is closed. This commit updates MachOPlatform and the ORC runtime to track __data and __common sections, and reset the state in MachOPlatformRuntimeState::dlcloseDeinitialize. This is only a first step to full support -- there are other data sections that we're not capturing, and we'll probably want a more efficient representation for the sections (rather than passing their string name over IPC), but this is a reasonable first step. This commit also contains a fix to MapperJITLinkMemoryManager that prevents it from calling OnDeallocated twice in the case of an error.
Loading
Please sign in to comment