From 8ec73e96b72d04787ed606cfbb62a7a2a05b3711 Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Mon, 7 Jun 2021 13:17:00 -0700 Subject: [ELF] getRelocatedSection: remove the check for ET_REL object file getRelocatedSection interface should not check that the object file is relocatable, as executable files may have relocations preserved with `--emit-relocs` linker flag. The relocations are useful in context of post-link binary analysis for function reference identification. For example, BOLT relies on relocations to perform function reordering. Reviewed By: MaskRay, jhenderson Differential Revision: https://reviews.llvm.org/D102296 --- llvm/lib/Object/XCOFFObjectFile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Object/XCOFFObjectFile.cpp') diff --git a/llvm/lib/Object/XCOFFObjectFile.cpp b/llvm/lib/Object/XCOFFObjectFile.cpp index 86815539..6e54e4a 100644 --- a/llvm/lib/Object/XCOFFObjectFile.cpp +++ b/llvm/lib/Object/XCOFFObjectFile.cpp @@ -440,7 +440,7 @@ SubtargetFeatures XCOFFObjectFile::getFeatures() const { bool XCOFFObjectFile::isRelocatableObject() const { if (is64Bit()) - report_fatal_error("64-bit support not implemented yet"); + return !(fileHeader64()->Flags & NoRelMask); return !(fileHeader32()->Flags & NoRelMask); } -- cgit v1.1