mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-08 04:11:27 +00:00
Improve pretty printing of GOT relocations in MachO on x86_64.
llvm-svn: 143031
This commit is contained in:
parent
c463f54342
commit
fc7467fd5e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user