Fix a pointer cast for 64bit.

Change-Id: I502f46e41a1089bd6f1cd84ddee8e92c35e6ef61
diff --git a/lib/ExecutionEngine/ELFObjectLoaderImpl.cpp b/lib/ExecutionEngine/ELFObjectLoaderImpl.cpp
index 4525daa..603695d 100644
--- a/lib/ExecutionEngine/ELFObjectLoaderImpl.cpp
+++ b/lib/ExecutionEngine/ELFObjectLoaderImpl.cpp
@@ -90,8 +90,9 @@
       ELFSectionBits<32> *section =
           static_cast<ELFSectionBits<32> *>(mObject->getSectionByIndex(i));
       if (section != NULL) {
-        section_header_table[i].sh_addr =
-            reinterpret_cast<llvm::ELF::Elf32_Addr>(section->getBuffer());
+        uintptr_t address = reinterpret_cast<uintptr_t>(section->getBuffer());
+        LOG_FATAL_IF(address > 0xFFFFFFFFu, "Out of bound address for Elf32_Addr");
+        section_header_table[i].sh_addr = static_cast<llvm::ELF::Elf32_Addr>(address);
       }
     }
   }