summaryrefslogtreecommitdiff
path: root/llvm/lib/Object/XCOFFObjectFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Object/XCOFFObjectFile.cpp')
-rw-r--r--llvm/lib/Object/XCOFFObjectFile.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Object/XCOFFObjectFile.cpp b/llvm/lib/Object/XCOFFObjectFile.cpp
index d09e7b0698ca..25a60f379fc2 100644
--- a/llvm/lib/Object/XCOFFObjectFile.cpp
+++ b/llvm/lib/Object/XCOFFObjectFile.cpp
@@ -737,9 +737,11 @@ bool XCOFFObjectFile::isRelocatableObject() const {
}
Expected<uint64_t> XCOFFObjectFile::getStartAddress() const {
- // TODO FIXME Should get from auxiliary_header->o_entry when support for the
- // auxiliary_header is added.
- return 0;
+ if (AuxiliaryHeader == nullptr)
+ return 0;
+
+ return is64Bit() ? auxiliaryHeader64()->getEntryPointAddr()
+ : auxiliaryHeader32()->getEntryPointAddr();
}
StringRef XCOFFObjectFile::mapDebugSectionName(StringRef Name) const {