[ORC][MachO] __objc_imageinfo isn't a MachO "object platform section".
authorLang Hames <lhames@gmail.com>
Sat, 1 Apr 2023 03:31:16 +0000 (20:31 -0700)
committerLang Hames <lhames@gmail.com>
Sat, 1 Apr 2023 03:41:32 +0000 (20:41 -0700)
commit88db195695215e920a63e197517103b4b9744445
tree21d1c2c5a60c38e042d61beb92de0697133f8d9f
parent22d4688ea436e9bae2f476cff84eaebea4c09a60
[ORC][MachO] __objc_imageinfo isn't a MachO "object platform section".

Commit 2666231d173 fixed a typo ("__objc_image_info" was corrected to
"__objc_imageinfo"), but this has exposed a bug where we were adding this
section to the list of platform sections to register with the ORC runtime.
The ORC runtime's MachO "object platform section" code doesn't recognize
this section (it's handled elsewhere) and errors out on it.

The solution is simply to remove __objc_imageinfo from the list of sections
to register in MachOPlatform::PlatformPlugin::registerObjectPlatformSections.
llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp