aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Object
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2011-10-26 17:08:49 +0000
committerOwen Anderson <resistor@mac.com>2011-10-26 17:08:49 +0000
commit9472b8d220fc746498429f430cb4c4dbfbd38f2a (patch)
tree81a510494c62fdacbee0f79202c732d77d6e4861 /lib/Object
parent929e27cc3c67d4c6355c7b56b2983722d28d2624 (diff)
downloadexternal_llvm-9472b8d220fc746498429f430cb4c4dbfbd38f2a.zip
external_llvm-9472b8d220fc746498429f430cb4c4dbfbd38f2a.tar.gz
external_llvm-9472b8d220fc746498429f430cb4c4dbfbd38f2a.tar.bz2
Expand relocation type field to 64 bits. MachO scattered relocations require 33 bits of type info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143032 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Object')
-rw-r--r--lib/Object/COFFObjectFile.cpp2
-rw-r--r--lib/Object/ELFObjectFile.cpp4
-rw-r--r--lib/Object/MachOObjectFile.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/Object/COFFObjectFile.cpp b/lib/Object/COFFObjectFile.cpp
index a048cf5..f19836b 100644
--- a/lib/Object/COFFObjectFile.cpp
+++ b/lib/Object/COFFObjectFile.cpp
@@ -623,7 +623,7 @@ error_code COFFObjectFile::getRelocationSymbol(DataRefImpl Rel,
return object_error::success;
}
error_code COFFObjectFile::getRelocationType(DataRefImpl Rel,
- uint32_t &Res) const {
+ uint64_t &Res) const {
const coff_relocation* R = toRel(Rel);
Res = R->Type;
return object_error::success;
diff --git a/lib/Object/ELFObjectFile.cpp b/lib/Object/ELFObjectFile.cpp
index 97ba916..d1a43e7 100644
--- a/lib/Object/ELFObjectFile.cpp
+++ b/lib/Object/ELFObjectFile.cpp
@@ -358,7 +358,7 @@ protected:
virtual error_code getRelocationSymbol(DataRefImpl Rel,
SymbolRef &Res) const;
virtual error_code getRelocationType(DataRefImpl Rel,
- uint32_t &Res) const;
+ uint64_t &Res) const;
virtual error_code getRelocationTypeName(DataRefImpl Rel,
SmallVectorImpl<char> &Result) const;
virtual error_code getRelocationAdditionalInfo(DataRefImpl Rel,
@@ -923,7 +923,7 @@ error_code ELFObjectFile<target_endianness, is64Bits>
template<support::endianness target_endianness, bool is64Bits>
error_code ELFObjectFile<target_endianness, is64Bits>
::getRelocationType(DataRefImpl Rel,
- uint32_t &Result) const {
+ uint64_t &Result) const {
const Elf_Shdr *sec = getSection(Rel.w.b);
switch (sec->sh_type) {
default :
diff --git a/lib/Object/MachOObjectFile.cpp b/lib/Object/MachOObjectFile.cpp
index d973f43..9ed5445 100644
--- a/lib/Object/MachOObjectFile.cpp
+++ b/lib/Object/MachOObjectFile.cpp
@@ -634,7 +634,7 @@ error_code MachOObjectFile::getRelocationSymbol(DataRefImpl Rel,
return object_error::success;
}
error_code MachOObjectFile::getRelocationType(DataRefImpl Rel,
- uint32_t &Res) const {
+ uint64_t &Res) const {
InMemoryStruct<macho::RelocationEntry> RE;
getRelocation(Rel, RE);
Res = RE->Word1;