}
uintX_t SymVA = Body->getVA<ELFT>();
+ bool CBP = canBePreempted(Body);
if (Target->needsPlt<ELFT>(Type, *Body)) {
SymVA = Body->getPltVA<ELFT>();
} else if (Target->needsGot(Type, *Body)) {
- if (Config->EMachine == EM_MIPS && !canBePreempted(Body))
+ if (Config->EMachine == EM_MIPS && !CBP)
// Under some conditions relocations against non-local symbols require
// entries in the local part of MIPS GOT. In that case we need an entry
// initialized by full address of the symbol.
continue;
} else if (Target->isTlsDynRel(Type, *Body)) {
continue;
- } else if (Target->isSizeRel(Type) && canBePreempted(Body)) {
+ } else if (Target->isSizeRel(Type) && CBP) {
// A SIZE relocation is supposed to set a symbol size, but if a symbol
// can be preempted, the size at runtime may be different than link time.
// If that's the case, we leave the field alone rather than filling it
if (Body)
Body = Body->repl();
+ bool CBP = canBePreempted(Body);
if (handleTlsRelocation<ELFT>(Type, Body, C, RI))
continue;
Body, getAddend<ELFT>(RI)});
// MIPS has a special rule to create GOTs for local symbols.
- if (Config->EMachine == EM_MIPS && !canBePreempted(Body) &&
+ if (Config->EMachine == EM_MIPS && !CBP &&
(Type == R_MIPS_GOT16 || Type == R_MIPS_CALL16)) {
// FIXME (simon): Do not add so many redundant entries.
Out<ELFT>::Got->addMipsLocalEntry();
if (Body->isInPlt())
continue;
Out<ELFT>::Plt->addEntry(Body);
- bool CBP = canBePreempted(Body);
if (Target->UseLazyBinding) {
Out<ELFT>::GotPlt->addEntry(Body);
Out<ELFT>::RelaPlt->addReloc(
continue;
}
- bool CBP = canBePreempted(Body);
bool Dynrel = Config->Shared && !Target->isRelRelative(Type) &&
!Target->isSizeRel(Type);
if (CBP || Dynrel) {
continue;
}
- if (canBePreempted(Body)) {
+ if (CBP) {
// We don't know anything about the finaly symbol. Just ask the dynamic
// linker to handle the relocation for us.
Out<ELFT>::RelaDyn->addReloc({Target->getDynRel(Type), &C, RI.r_offset,