diff options
| author | Owen Anderson <resistor@mac.com> | 2011-10-26 17:08:49 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2011-10-26 17:08:49 +0000 |
| commit | 7be76590e6bb78e80842d632e7217c138f4fb4f0 (patch) | |
| tree | 67b43f31318b86af5c98158ec38756bcd3c73dce /llvm/lib/Object | |
| parent | b92de2de71c815459a6eccbae66b5a2164d18700 (diff) | |
| download | bcm5719-llvm-7be76590e6bb78e80842d632e7217c138f4fb4f0.tar.gz bcm5719-llvm-7be76590e6bb78e80842d632e7217c138f4fb4f0.zip | |
Expand relocation type field to 64 bits. MachO scattered relocations require 33 bits of type info.
llvm-svn: 143032
Diffstat (limited to 'llvm/lib/Object')
| -rw-r--r-- | llvm/lib/Object/COFFObjectFile.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Object/ELFObjectFile.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/Object/MachOObjectFile.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp index a048cf50a58..f19836b718a 100644 --- a/llvm/lib/Object/COFFObjectFile.cpp +++ b/llvm/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/llvm/lib/Object/ELFObjectFile.cpp b/llvm/lib/Object/ELFObjectFile.cpp index 97ba9167a53..d1a43e7b958 100644 --- a/llvm/lib/Object/ELFObjectFile.cpp +++ b/llvm/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/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp index d973f430c42..9ed5445ddaa 100644 --- a/llvm/lib/Object/MachOObjectFile.cpp +++ b/llvm/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; |

