From 6231ba0eed7898020fab6393b2792bbfaa175efd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20Gr=C3=A4nitz?= Date: Fri, 31 Mar 2023 12:48:16 +0200 Subject: [PATCH] [Orc] Drop arch check in the DebugObjectManagerPlugin for ELF Tested this with the new AArch32 backend on armv7l and it works without issues in GDB. The size of the load-address field is only 32-bit here, but we implicitly account for it by writing a ELFT::uint which is: https://github.com/llvm/llvm-project/blob/release/16.x/llvm/include/llvm/Object/ELFTypes.h#L57 So, instead of adding a newly supported machine type, let's just drop this restriction althogether. --- llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp b/llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp index bd2faeb..ab2f7a1 100644 --- a/llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp +++ b/llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp @@ -60,8 +60,6 @@ public: private: typename ELFT::Shdr *Header; - - bool isTextOrDataSection() const; }; template @@ -268,11 +266,6 @@ ELFDebugObject::CreateArchType(MemoryBufferRef Buffer, if (!ObjRef) return ObjRef.takeError(); - // TODO: Add support for other architectures. - uint16_t TargetMachineArch = ObjRef->getHeader().e_machine; - if (TargetMachineArch != ELF::EM_X86_64) - return nullptr; - Expected> Sections = ObjRef->sections(); if (!Sections) return Sections.takeError(); -- 2.7.4