Lines Matching refs:rel
37 void relocate(uint8_t *loc, const Relocation &rel,
283 void X86::relocate(uint8_t *loc, const Relocation &rel, uint64_t val) const { in relocate() argument
284 switch (rel.type) { in relocate()
289 checkIntUInt(loc, val, 8, rel); in relocate()
293 checkInt(loc, val, 8, rel); in relocate()
297 checkIntUInt(loc, val, 16, rel); in relocate()
311 checkInt(loc, val, 17, rel); in relocate()
335 checkInt(loc, val, 32, rel); in relocate()
347 static void relaxTlsGdToLe(uint8_t *loc, const Relocation &rel, uint64_t val) { in relaxTlsGdToLe() argument
348 if (rel.type == R_386_TLS_GD) { in relaxTlsGdToLe()
363 } else if (rel.type == R_386_TLS_GOTDESC) { in relaxTlsGdToLe()
376 assert(rel.type == R_386_TLS_DESC_CALL); in relaxTlsGdToLe()
382 static void relaxTlsGdToIe(uint8_t *loc, const Relocation &rel, uint64_t val) { in relaxTlsGdToIe() argument
383 if (rel.type == R_386_TLS_GD) { in relaxTlsGdToIe()
397 } else if (rel.type == R_386_TLS_GOTDESC) { in relaxTlsGdToIe()
408 assert(rel.type == R_386_TLS_DESC_CALL); in relaxTlsGdToIe()
416 static void relaxTlsIeToLe(uint8_t *loc, const Relocation &rel, uint64_t val) { in relaxTlsIeToLe() argument
423 if (rel.type == R_386_TLS_IE) { in relaxTlsIeToLe()
439 assert(rel.type == R_386_TLS_GOTIE); in relaxTlsIeToLe()
453 static void relaxTlsLdToLe(uint8_t *loc, const Relocation &rel, uint64_t val) { in relaxTlsLdToLe() argument
454 if (rel.type == R_386_TLS_LDO_32) { in relaxTlsLdToLe()
488 for (const Relocation &rel : sec.relocs()) { in relocateAlloc() local
489 uint8_t *loc = buf + rel.offset; in relocateAlloc()
491 sec.getRelocTargetVA(sec.file, rel.type, rel.addend, in relocateAlloc()
492 secAddr + rel.offset, *rel.sym, rel.expr), in relocateAlloc()
494 switch (rel.expr) { in relocateAlloc()
496 relaxTlsGdToIe(loc, rel, val); in relocateAlloc()
500 relaxTlsGdToLe(loc, rel, val); in relocateAlloc()
503 relaxTlsLdToLe(loc, rel, val); in relocateAlloc()
506 relaxTlsIeToLe(loc, rel, val); in relocateAlloc()
509 relocate(loc, rel, val); in relocateAlloc()