Reordering KextImageInfo::LoadImageUsingMemoryModule
authorJason Molenda <jmolenda@apple.com>
Fri, 8 Nov 2019 03:34:09 +0000 (19:34 -0800)
committerJason Molenda <jmolenda@apple.com>
Fri, 8 Nov 2019 03:34:09 +0000 (19:34 -0800)
commit6602e1fb0e34c1a755ef561de24e5b78a460672a
tree23ad9bc3806a17f707216211f49667e70d5d37d9
parente0407f54965318247c8fece2dfa5c9023acf0973
Reordering KextImageInfo::LoadImageUsingMemoryModule
so we only call ModulesDidLoad at the end of the method
after the new module has been added to the target and
the sections have all been adjusted to their actual
load addresses.  Solves a problem where an operating
system plugin in the kernel could be loaded multiple
times; the first before the binary had even been
added to the target.

<rdar://problem/50523558>
lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp