Lines Matching refs:rel
40 void relocate(uint8_t *loc, const Relocation &rel,
329 for (Relocation &rel : sec->relocs()) { in relaxOnce()
330 if (rel.expr != R_RELAX_GOT_PC && rel.expr != R_RELAX_GOT_PC_NOPIC) in relaxOnce()
332 assert(rel.addend == -4); in relaxOnce()
335 sec->file, rel.type, rel.expr == R_RELAX_GOT_PC_NOPIC ? 0 : -4, in relaxOnce()
336 sec->getOutputSection()->addr + sec->outSecOff + rel.offset, in relaxOnce()
337 *rel.sym, rel.expr); in relaxOnce()
340 if (rel.sym->auxIdx == 0) { in relaxOnce()
341 rel.sym->allocateAux(); in relaxOnce()
342 addGotEntry(*rel.sym); in relaxOnce()
345 rel.expr = R_GOT_PC; in relaxOnce()
462 static void relaxTlsGdToLe(uint8_t *loc, const Relocation &rel, uint64_t val) { in relaxTlsGdToLe() argument
463 if (rel.type == R_X86_64_TLSGD) { in relaxTlsGdToLe()
481 } else if (rel.type == R_X86_64_GOTPC32_TLSDESC) { in relaxTlsGdToLe()
496 assert(rel.type == R_X86_64_TLSDESC_CALL); in relaxTlsGdToLe()
502 static void relaxTlsGdToIe(uint8_t *loc, const Relocation &rel, uint64_t val) { in relaxTlsGdToIe() argument
503 if (rel.type == R_X86_64_TLSGD) { in relaxTlsGdToIe()
521 } else if (rel.type == R_X86_64_GOTPC32_TLSDESC) { in relaxTlsGdToIe()
523 assert(rel.type == R_X86_64_GOTPC32_TLSDESC); in relaxTlsGdToIe()
535 assert(rel.type == R_X86_64_TLSDESC_CALL); in relaxTlsGdToIe()
584 static void relaxTlsLdToLe(uint8_t *loc, const Relocation &rel, uint64_t val) { in relaxTlsLdToLe() argument
763 static void relaxGot(uint8_t *loc, const Relocation &rel, uint64_t val);
765 void X86_64::relocate(uint8_t *loc, const Relocation &rel, uint64_t val) const { in relocate() argument
766 switch (rel.type) { in relocate()
768 checkIntUInt(loc, val, 8, rel); in relocate()
772 checkInt(loc, val, 8, rel); in relocate()
776 checkIntUInt(loc, val, 16, rel); in relocate()
780 checkInt(loc, val, 16, rel); in relocate()
784 checkUInt(loc, val, 32, rel); in relocate()
795 checkInt(loc, val, 32, rel); in relocate()
811 if (rel.expr != R_GOT_PC) { in relocate()
812 relaxGot(loc, rel, val); in relocate()
814 checkInt(loc, val, 32, rel); in relocate()
821 if (rel.expr == R_RELAX_TLS_GD_TO_LE) { in relocate()
822 relaxTlsGdToLe(loc, rel, val); in relocate()
823 } else if (rel.expr == R_RELAX_TLS_GD_TO_IE) { in relocate()
824 relaxTlsGdToIe(loc, rel, val); in relocate()
826 checkInt(loc, val, 32, rel); in relocate()
831 if (rel.expr == R_RELAX_TLS_LD_TO_LE) { in relocate()
832 relaxTlsLdToLe(loc, rel, val); in relocate()
834 checkInt(loc, val, 32, rel); in relocate()
839 if (rel.expr == R_RELAX_TLS_IE_TO_LE) { in relocate()
840 relaxTlsIeToLe(loc, rel, val); in relocate()
842 checkInt(loc, val, 32, rel); in relocate()
847 checkInt(loc, val, 32, rel); in relocate()
960 static void relaxGot(uint8_t *loc, const Relocation &rel, uint64_t val) { in relaxGot() argument
1041 for (const Relocation &rel : sec.relocs()) { in relocateAlloc() local
1042 if (rel.expr == R_NONE) // See deleteFallThruJmpInsn in relocateAlloc()
1044 uint8_t *loc = buf + rel.offset; in relocateAlloc()
1046 sec.getRelocTargetVA(sec.file, rel.type, rel.addend, in relocateAlloc()
1047 secAddr + rel.offset, *rel.sym, rel.expr); in relocateAlloc()
1048 relocate(loc, rel, val); in relocateAlloc()