Lines Matching refs:rel

183   void relocate(uint8_t *loc, const Relocation &rel,
194 void relaxGot(uint8_t *loc, const Relocation &rel, uint64_t val) const;
201 void relaxTlsGdToIe(uint8_t *loc, const Relocation &rel, uint64_t val) const;
202 void relaxTlsGdToLe(uint8_t *loc, const Relocation &rel, uint64_t val) const;
203 void relaxTlsLdToLe(uint8_t *loc, const Relocation &rel, uint64_t val) const;
204 void relaxTlsIeToLe(uint8_t *loc, const Relocation &rel, uint64_t val) const;
380 static bool tryRelaxPPC64TocIndirection(const Relocation &rel, in tryRelaxPPC64TocIndirection() argument
383 if (rel.addend < 0) in tryRelaxPPC64TocIndirection()
387 Defined *defSym = dyn_cast<Defined>(rel.sym); in tryRelaxPPC64TocIndirection()
395 config->isLE ? getRelaTocSymAndAddend<ELF64LE>(tocISB, rel.addend) in tryRelaxPPC64TocIndirection()
396 : getRelaTocSymAndAddend<ELF64BE>(tocISB, rel.addend); in tryRelaxPPC64TocIndirection()
412 static_cast<const PPC64 &>(*target).relaxGot(bufLoc, rel, in tryRelaxPPC64TocIndirection()
652 void PPC64::relaxGot(uint8_t *loc, const Relocation &rel, uint64_t val) const { in relaxGot() argument
653 switch (rel.type) { in relaxGot()
656 relocate(loc, rel, val); in relaxGot()
679 relocate(loc, rel, val); in relaxGot()
687 uint32_t accessInsn = read32(loc + rel.addend); in relaxGot()
708 write32(loc + rel.addend, NOP); // nop accessInsn. in relaxGot()
716 void PPC64::relaxTlsGdToLe(uint8_t *loc, const Relocation &rel, in relaxTlsGdToLe() argument
733 switch (rel.type) { in relaxTlsGdToLe()
779 void PPC64::relaxTlsLdToLe(uint8_t *loc, const Relocation &rel, in relaxTlsLdToLe() argument
796 switch (rel.type) { in relaxTlsLdToLe()
837 relocate(loc, rel, val); in relaxTlsLdToLe()
891 void PPC64::relaxTlsIeToLe(uint8_t *loc, const Relocation &rel, in relaxTlsIeToLe() argument
913 switch (rel.type) { in relaxTlsIeToLe()
1259 void PPC64::relocate(uint8_t *loc, const Relocation &rel, uint64_t val) const { in relocate() argument
1260 RelType type = rel.type; in relocate()
1268 checkAlignment(loc, val, 4, rel); in relocate()
1275 checkIntUInt(loc, val, 16, rel); in relocate()
1279 checkIntUInt(loc, val, 32, rel); in relocate()
1284 checkInt(loc, val, 16, rel); in relocate()
1288 checkAlignment(loc, lo(val), mask + 1, rel); in relocate()
1297 checkInt(loc, val + 0x8000, 32, rel); in relocate()
1304 checkInt(loc, val, 32, rel); in relocate()
1349 checkAlignment(loc, lo(val), mask + 1, rel); in relocate()
1365 checkInt(loc, val, 16, rel); in relocate()
1369 checkInt(loc, val, 32, rel); in relocate()
1379 checkInt(loc, val, 16, rel); in relocate()
1380 checkAlignment(loc, val, 4, rel); in relocate()
1387 checkInt(loc, val, 26, rel); in relocate()
1388 checkAlignment(loc, val, 4, rel); in relocate()
1410 checkInt(loc, val, 34, rel); in relocate()
1512 void PPC64::relaxTlsGdToIe(uint8_t *loc, const Relocation &rel, in relaxTlsGdToIe() argument
1514 switch (rel.type) { in relaxTlsGdToIe()
1570 for (const Relocation &rel : sec.relocs()) { in relocateAlloc() local
1571 uint8_t *loc = buf + rel.offset; in relocateAlloc()
1573 sec.getRelocTargetVA(sec.file, rel.type, rel.addend, in relocateAlloc()
1574 secAddr + rel.offset, *rel.sym, rel.expr); in relocateAlloc()
1575 switch (rel.expr) { in relocateAlloc()
1583 if (rel.type == R_PPC64_GOT_PCREL34) in relocateAlloc()
1584 lastPPCRelaxedRelocOff = rel.offset; in relocateAlloc()
1585 if (rel.type == R_PPC64_PCREL_OPT && rel.offset != lastPPCRelaxedRelocOff) in relocateAlloc()
1587 relaxGot(loc, rel, val); in relocateAlloc()
1596 if (ppc64noTocRelax.count({rel.sym, rel.addend}) || in relocateAlloc()
1597 !tryRelaxPPC64TocIndirection(rel, loc)) in relocateAlloc()
1598 relocate(loc, rel, val); in relocateAlloc()
1608 if (rel.sym->needsTocRestore()) { in relocateAlloc()
1613 if ((rel.offset + 8 > sec.content().size() || in relocateAlloc()
1615 rel.sym->file != sec.file) { in relocateAlloc()
1618 lld::toString(*rel.sym).substr(6) + in relocateAlloc()
1624 relocate(loc, rel, val); in relocateAlloc()
1628 relaxTlsGdToIe(loc, rel, val); in relocateAlloc()
1631 relaxTlsGdToLe(loc, rel, val); in relocateAlloc()
1634 relaxTlsLdToLe(loc, rel, val); in relocateAlloc()
1637 relaxTlsIeToLe(loc, rel, val); in relocateAlloc()
1640 relocate(loc, rel, val); in relocateAlloc()