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