[llvm] 88db195 - [ORC][MachO] __objc_imageinfo isn't a MachO "object platform section".
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 31 20:41:43 PDT 2023
Author: Lang Hames
Date: 2023-03-31T20:41:32-07:00
New Revision: 88db195695215e920a63e197517103b4b9744445
URL: https://github.com/llvm/llvm-project/commit/88db195695215e920a63e197517103b4b9744445
DIFF: https://github.com/llvm/llvm-project/commit/88db195695215e920a63e197517103b4b9744445.diff
LOG: [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.
Added:
Modified:
llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp b/llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp
index 4266bbc7b120..10364e435314 100644
--- a/llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp
@@ -1166,10 +1166,9 @@ Error MachOPlatform::MachOPlatformPlugin::registerObjectPlatformSections(
// If any platform sections were found then add an allocation action to call
// the registration function.
StringRef PlatformSections[] = {
- MachOModInitFuncSectionName, MachOObjCClassListSectionName,
- MachOObjCImageInfoSectionName, MachOObjCSelRefsSectionName,
- MachOSwift5ProtoSectionName, MachOSwift5ProtosSectionName,
- MachOSwift5TypesSectionName,
+ MachOModInitFuncSectionName, MachOObjCClassListSectionName,
+ MachOObjCSelRefsSectionName, MachOSwift5ProtoSectionName,
+ MachOSwift5ProtosSectionName, MachOSwift5TypesSectionName,
};
for (auto &SecName : PlatformSections) {
More information about the llvm-commits
mailing list