diff options
author | Owen Anderson <resistor@mac.com> | 2011-10-26 17:05:20 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2011-10-26 17:05:20 +0000 |
commit | b92de2de71c815459a6eccbae66b5a2164d18700 (patch) | |
tree | c4b7a244c3b34532bb880f04db541855674cfc54 /llvm/lib/Object/MachOObjectFile.cpp | |
parent | 580b29f9cb01814d311c9d1a011d0fe7e1cf59dc (diff) | |
download | bcm5719-llvm-b92de2de71c815459a6eccbae66b5a2164d18700.tar.gz bcm5719-llvm-b92de2de71c815459a6eccbae66b5a2164d18700.zip |
Improve pretty printing of GOT relocations in MachO on x86_64.
llvm-svn: 143031
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/MachOObjectFile.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp index e3a7499bcc0..d973f430c42 100644 --- a/llvm/lib/Object/MachOObjectFile.cpp +++ b/llvm/lib/Object/MachOObjectFile.cpp @@ -807,8 +807,15 @@ error_code MachOObjectFile::getRelocationValueString(DataRefImpl Rel, StringRef Name; if (error_code ec = getRelocationTargetName(RE->Word1, Name)) report_fatal_error(ec.message()); + bool isPCRel = ((RE->Word1 >> 24) & 1); switch (Type) { + case 3: // X86_64_RELOC_GOT_LOAD + case 4: { // X86_64_RELOC_GOT + fmt << Name << "@GOT"; + if (isPCRel) fmt << "PCREL"; + break; + } case 5: { // X86_64_RELOC_SUBTRACTOR InMemoryStruct<macho::RelocationEntry> RENext; DataRefImpl RelNext = Rel; |