mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-30 07:14:53 +00:00
Add (some) PowerPC TLS relocation types to ELF.h and
generate them from PPCELFObjectWriter::getRelocTypeInner as appropriate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167864 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8f887369cb
commit
ba6086818d
@ -457,7 +457,9 @@ enum {
|
||||
R_PPC_REL14 = 11,
|
||||
R_PPC_REL14_BRTAKEN = 12,
|
||||
R_PPC_REL14_BRNTAKEN = 13,
|
||||
R_PPC_REL32 = 26
|
||||
R_PPC_REL32 = 26,
|
||||
R_PPC_TPREL16_LO = 70,
|
||||
R_PPC_TPREL16_HA = 72
|
||||
};
|
||||
|
||||
// ELF Relocation types for PPC64
|
||||
|
@ -74,10 +74,26 @@ unsigned PPCELFObjectWriter::getRelocTypeInner(const MCValue &Target,
|
||||
Type = ELF::R_PPC_ADDR14; // XXX: or BRNTAKEN?_
|
||||
break;
|
||||
case PPC::fixup_ppc_ha16:
|
||||
Type = ELF::R_PPC_ADDR16_HA;
|
||||
switch (Modifier) {
|
||||
default: llvm_unreachable("Unsupported Modifier");
|
||||
case MCSymbolRefExpr::VK_PPC_TPREL16_HA:
|
||||
Type = ELF::R_PPC_TPREL16_HA;
|
||||
break;
|
||||
case MCSymbolRefExpr::VK_None:
|
||||
Type = ELF::R_PPC_ADDR16_HA;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case PPC::fixup_ppc_lo16:
|
||||
Type = ELF::R_PPC_ADDR16_LO;
|
||||
switch (Modifier) {
|
||||
default: llvm_unreachable("Unsupported Modifier");
|
||||
case MCSymbolRefExpr::VK_PPC_TPREL16_LO:
|
||||
Type = ELF::R_PPC_TPREL16_LO;
|
||||
break;
|
||||
case MCSymbolRefExpr::VK_None:
|
||||
Type = ELF::R_PPC_ADDR16_LO;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case PPC::fixup_ppc_lo14:
|
||||
Type = ELF::R_PPC_ADDR14;
|
||||
|
Loading…
x
Reference in New Issue
Block a user