Lines Matching full:relocation

15 // reading records from relocation sections and applying them to output.
21 // fixing addresses in relocation processing.
38 // It instead stores Relocation objects to InputSection's Relocations
99 void elf::reportRangeError(uint8_t *loc, const Relocation &rel, const Twine &v, in reportRangeError()
125 errorOrWarn(errPlace.loc + "relocation " + lld::toString(rel.type) + in reportRangeError()
170 // In case of global symbol, the R_MIPS_GOT16 relocation does not in getMipsPairType()
173 // relocation loads an address of the symbol. In case of local in getMipsPairType()
174 // symbol, the R_MIPS_GOT16 relocation creates a GOT entry to hold in getMipsPairType()
284 // them are copied by a copy relocation, all of them need to be copied.
313 // effectively a defined symbol. In the case of copy relocation the symbol is
332 // Reserve space in .bss or .bss.rel.ro for copy relocation.
334 // The copy relocation is pretty much a hack. If you use a copy relocation
341 // So, what is the copy relocation? It's for linking non-position
347 // the copy relocation takes a role.
349 // A copy relocation instructs the dynamic linker to copy data from a DSO
352 // symbol, it creates a copy relocation, so that the symbol can be
355 // As you can see in this function, we create a copy relocation for the
356 // dynamic linker, and the relocation contains not only symbol name but
375 // Copy relocation against zero-sized symbol doesn't make sense. in addCopyRelSymbol()
378 fatal("cannot create a copy relocation for symbol " + toString(ss)); in addCopyRelSymbol()
397 // dynamic symbol for each one. This causes the copy relocation to correctly in addCopyRelSymbol()
443 fatal(".eh_frame: relocation is not in any piece"); in get()
486 // For example, if a relocation is of R_MIPS_HI16, there must be a
487 // R_MIPS_LO16 relocation after that, and an addend is calculated using
495 // The ABI says that the paired relocation is used only for REL. in computeMipsAddend()
497 // This generalises to relocation types with implicit addends. in computeMipsAddend()
510 // the relocation table, so we need to do linear search. *sigh* in computeMipsAddend()
516 warn("can't find matching " + toString(pairTy) + " relocation for " + in computeMipsAddend()
532 msg = "relocation refers to a discarded section: "; in maybeReportDiscarded()
536 msg = "relocation refers to a symbol in a discarded section: " + in maybeReportDiscarded()
856 // as a single relocation. The similar approach used by N64 ABI, but this ABI
857 // packs all relocations into the single relocation record. Here we emulate
858 // this for the N32 ABI. Iterate over relocation with the same offset and put
882 // the symbol. When we have a RELATIVE relocation though, we no longer have in addRelativeReloc()
884 // puts the result of the RELATIVE relocation out-of-bounds of the symbol in addRelativeReloc()
894 // Add a relative relocation. If relrDyn section is enabled, and the in addRelativeReloc()
895 // relocation offset is guaranteed to be even, add the relocation to in addRelativeReloc()
928 // If preemptible, emit a GLOB_DAT relocation. in addGotEntry()
973 // Returns true if a given relocation can be computed at link-time.
974 // This only handles relocation types expected in processAux.
976 // For instance, we know the offset from a relocation to its target at
977 // link-time if the relocation is PC-relative and refers a
979 // will return true for such relocation.
982 // dynamic relocation so that the relocation will be fixed at load-time.
1001 // R_AARCH64_AUTH_ABS64 requires a dynamic relocation. in isStaticLinkTimeConstant()
1011 // For the target and the relocation, we want to know if they are in isStaticLinkTimeConstant()
1037 error("relocation " + toString(type) + " cannot refer to absolute symbol: " + in isStaticLinkTimeConstant()
1084 // direct relocation on through. in processAux()
1095 // require relocation entries for them. A special case is TLS in processAux()
1113 // If the relocation is known to be a link-time constant, we know no dynamic in processAux()
1114 // relocation will be created, pass the control to relocateAlloc() or in processAux()
1123 // dynamic relocation (except IRELATIVE). Emitting dynamic relocations for in processAux()
1138 // conversion. We still emit a dynamic relocation. in processAux()
1155 // For a preemptible symbol, we can't use a relative relocation. For an in processAux()
1157 // relative relocation. Use a symbolic relocation instead. in processAux()
1181 // a preemptible symbol has a dynamic relocation we anyway have in processAux()
1183 // If a non-preemptible symbol has a dynamic relocation against it, in processAux()
1185 // result of the dynamic relocation. In case of preemptible symbol in processAux()
1188 // a dynamic relocation. in processAux()
1209 // Produce a copy relocation. in processAux()
1212 error("unresolvable relocation " + toString(type) + in processAux()
1223 // an ideal world, we could just report an error saying the relocation can in processAux()
1240 // plt. That is identified by special relocation types (R_X86_64_JUMP_SLOT, in processAux()
1260 errorOrWarn("relocation " + toString(type) + " cannot be used against " + in processAux()
1300 errorOrWarn("relocation " + toString(type) + " against " + toString(sym) + in handleTlsRelocation()
1311 // generate TLSDESC dynamic relocation for the dynamic linker to handle. in handleTlsRelocation()
1427 // R_GOT needs a relative relocation for PIC on i386 and Hexagon. in handleTlsRelocation()
1457 // Get an offset in an output section this relocation is applied to. in scanOne()
1506 "relocation" + in scanOne()
1519 // If the relocation does not emit a GOT or GOTPLT entry but its computation in scanOne()
1548 // General Dynamic/Local Dynamic code sequences. If a GD/LD GOT relocation is
1616 [](const Relocation &lhs, const Relocation &rhs) { in scan()
1635 // Scan all relocations. Each relocation goes through a series of tests to in scanRelocations()
1696 // The GOT entry is relocated using an IRELATIVE relocation in relaDyn, in handleNonPreemptibleIfunc()
1702 // symbol. This means that if a direct relocation to the symbol is in handleNonPreemptibleIfunc()
1711 // the value computed using a direct relocation, a non-preemptible ifunc in handleNonPreemptibleIfunc()
1719 // not require any form of dynamic relocation. To handle these relocations in handleNonPreemptibleIfunc()
1731 // Create an Iplt and the associated IRELATIVE relocation pointing to the in handleNonPreemptibleIfunc()
1732 // original section/value pairs. For non-GOT non-PLT relocation case below, we in handleNonPreemptibleIfunc()
1738 // IRELATIVE relocations in the packed relocation section would read in handleNonPreemptibleIfunc()
1996 // the relocation back to the original target and create another Thunk.
2060 const Relocation &rel, in getISDThunkSec()
2219 Relocation &rel, uint64_t src) { in getThunk()
2222 // out in the relocation addend. We compensate for the PC bias so that in getThunk()
2223 // an Arm and Thumb relocation to the same destination get the same keyAddend, in getThunk()
2231 // offset + addend) pair. We may revert the relocation back to its original in getThunk()
2254 // Return true if the relocation target is an in range Thunk.
2255 // Return false if the relocation is not to a Thunk. If the relocation target
2257 // relocation back to its original non-Thunk target.
2258 bool ThunkCreator::normalizeExistingThunk(Relocation &rel, uint64_t src) { in normalizeExistingThunk()
2281 // The offsets between caller (relocation place) and callee
2282 // (relocation target) will not be modified outside of createThunks().
2294 // relocation out of range error.
2311 for (Relocation &rel : isec->relocs()) { in createThunks()
2314 // If we are a relocation to an existing Thunk, check if it is in createThunks()
2339 // Redirect relocation to Thunk, we never go via the PLT to a Thunk in createThunks()
2343 // On AArch64 and PPC, a jump/call relocation may be encoded as in createThunks()
2365 // hexagonTLSSymbolUpdate rebinds the relocation to __tls_get_addr.
2371 for (Relocation &rel : isec->relocs()) in hexagonNeedsTLSSymbol()
2388 for (Relocation &rel : isec->relocs()) in hexagonTLSSymbolUpdate()