[ELF] Support R_PPC_ADDR24 (ba foo; bla foo)
This commit is contained in:
parent
3cbd476c54
commit
3809f4ebab
|
@ -222,6 +222,7 @@ RelExpr PPC::getRelExpr(RelType type, const Symbol &s,
|
|||
case R_PPC_ADDR16_HA:
|
||||
case R_PPC_ADDR16_HI:
|
||||
case R_PPC_ADDR16_LO:
|
||||
case R_PPC_ADDR24:
|
||||
case R_PPC_ADDR32:
|
||||
return R_ABS;
|
||||
case R_PPC_DTPREL16:
|
||||
|
@ -345,6 +346,7 @@ void PPC::relocate(uint8_t *loc, const Relocation &rel, uint64_t val) const {
|
|||
write32(loc, (read32(loc) & ~mask) | (val & mask));
|
||||
break;
|
||||
}
|
||||
case R_PPC_ADDR24:
|
||||
case R_PPC_REL24:
|
||||
case R_PPC_LOCAL24PC:
|
||||
case R_PPC_PLTREL24: {
|
||||
|
|
|
@ -19,8 +19,13 @@
|
|||
# CHECK-LABEL: section .R_PPC_ADDR16_LO:
|
||||
# CHECK: addi 4, 4, 4660
|
||||
|
||||
.section .R_PPC_ADDR24,"ax",@progbits
|
||||
ba a
|
||||
# CHECK-LABEL: section .R_PPC_ADDR24:
|
||||
# CHECK: ba 4660
|
||||
|
||||
.section .R_PPC_ADDR32,"a",@progbits
|
||||
.long a
|
||||
.long b
|
||||
# HEX-LABEL: section .R_PPC_ADDR32:
|
||||
# HEX-NEXT: 100000b4 00001234 000bcdef
|
||||
# HEX-NEXT: {{.*}} 00001234 000bcdef
|
||||
|
|
Loading…
Reference in New Issue
Block a user