Skip to content

Commit

Permalink
[Orc] Drop arch check in the DebugObjectManagerPlugin for ELF
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
weliveindetail committed Mar 31, 2023
1 parent bdbc942 commit 6231ba0
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ class ELFDebugObjectSection : public DebugObjectSection {

private:
typename ELFT::Shdr *Header;

bool isTextOrDataSection() const;
};

template <typename ELFT>
Expand Down Expand Up @@ -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<ArrayRef<SectionHeader>> Sections = ObjRef->sections();
if (!Sections)
return Sections.takeError();
Expand Down

0 comments on commit 6231ba0

Please sign in to comment.