mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
initial draft of PPCMachObjectWriter.cpp
this records relocation entries in the mach-o object file for PIC code generation. tested on powerpc-darwin8, validated against darwin otool -rvV git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188004 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1059,7 +1059,8 @@ MachOObjectFile::getRelocationValueString(DataRefImpl Rel,
|
||||
break;
|
||||
}
|
||||
// X86 and ARM share some relocation types in common.
|
||||
} else if (Arch == Triple::x86 || Arch == Triple::arm) {
|
||||
} else if (Arch == Triple::x86 || Arch == Triple::arm ||
|
||||
Arch == Triple::ppc) {
|
||||
// Generic relocation types...
|
||||
switch (Type) {
|
||||
case macho::RIT_Pair: // GENERIC_RELOC_PAIR - prints no info
|
||||
@ -1084,7 +1085,7 @@ MachOObjectFile::getRelocationValueString(DataRefImpl Rel,
|
||||
}
|
||||
}
|
||||
|
||||
if (Arch == Triple::x86) {
|
||||
if (Arch == Triple::x86 || Arch == Triple::ppc) {
|
||||
// All X86 relocations that need special printing were already
|
||||
// handled in the generic code.
|
||||
switch (Type) {
|
||||
@ -1177,7 +1178,7 @@ MachOObjectFile::getRelocationHidden(DataRefImpl Rel, bool &Result) const {
|
||||
|
||||
// On arches that use the generic relocations, GENERIC_RELOC_PAIR
|
||||
// is always hidden.
|
||||
if (Arch == Triple::x86 || Arch == Triple::arm) {
|
||||
if (Arch == Triple::x86 || Arch == Triple::arm || Arch == Triple::ppc) {
|
||||
if (Type == macho::RIT_Pair) Result = true;
|
||||
} else if (Arch == Triple::x86_64) {
|
||||
// On x86_64, X86_64_RELOC_UNSIGNED is hidden only when it follows
|
||||
|
Reference in New Issue
Block a user