aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/XCOFFObjectFile.cpp
diff options
context:
space:
mode:
authorAmir Ayupov <aaupov@fb.com>2021-06-07 13:17:00 -0700
committerFangrui Song <i@maskray.me>2021-06-07 13:17:00 -0700
commit8ec73e96b72d04787ed606cfbb62a7a2a05b3711 (patch)
tree52aa2261c55d18216f21f1d005f85146ab7a024a /llvm/lib/Object/XCOFFObjectFile.cpp
parent75521bd9d8d1e39b1a765a14d95c49291d2adde5 (diff)
downloadllvm-8ec73e96b72d04787ed606cfbb62a7a2a05b3711.zip
llvm-8ec73e96b72d04787ed606cfbb62a7a2a05b3711.tar.gz
llvm-8ec73e96b72d04787ed606cfbb62a7a2a05b3711.tar.bz2
[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
Diffstat (limited to 'llvm/lib/Object/XCOFFObjectFile.cpp')
-rw-r--r--llvm/lib/Object/XCOFFObjectFile.cpp2
1 files changed, 1 insertions, 1 deletions
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);
}