Stub* AArch64CA53Erratum843419Stub2::doClone() {
  return new AArch64CA53Erratum843419Stub2(getData(),
                                           size(),
                                           "erratum_843419_veneer",
                                           fixup_begin(),
                                           fixup_end());
}
Beispiel #2
0
void Stub::applyFixup(Relocation& pSrcReloc,
                      IRBuilder& pBuilder,
                      BranchIsland& pIsland) {
  // build a name for stub symbol
  std::string sym_name("__");
  sym_name.append(pSrcReloc.symInfo()->name())
          .append("_")
          .append(name())
          .append("@")
          .append(pIsland.name());

  // create LDSymbol for the stub
  LDSymbol* symbol =
      pBuilder.AddSymbol<IRBuilder::Force, IRBuilder::Unresolve>(
          sym_name,
          ResolveInfo::Function,
          ResolveInfo::Define,
          ResolveInfo::Local,
          size(),
          initSymValue(),
          FragmentRef::Create(*this, initSymValue()),
          ResolveInfo::Default);
  setSymInfo(symbol->resolveInfo());

  // add relocations of this stub (i.e., set the branch target of the stub)
  for (fixup_iterator it = fixup_begin(), ie = fixup_end(); it != ie; ++it) {
    Relocation* reloc =
        Relocation::Create((*it)->type(),
                           *(FragmentRef::Create(*this, (*it)->offset())),
                           (*it)->addend());
    reloc->setSymInfo(pSrcReloc.symInfo());
    pIsland.addRelocation(*reloc);
  }
}
Stub* MipsLA25Stub::doClone() {
  return new MipsLA25Stub(
      m_Target, m_pData, m_Size, fixup_begin(), fixup_end());
}
Beispiel #4
0
Stub::~Stub() {
  for (fixup_iterator fixup = fixup_begin(); fixup != fixup_end(); ++fixup)
    delete (*fixup);
}
Beispiel #5
0
Stub* ARMToTHMStub::doClone() {
  return new ARMToTHMStub(m_pData, m_Size, fixup_begin(), fixup_end());
}
Stub* THMToTHMStub::doClone() {
  return new THMToTHMStub(
      m_pData, m_Size, fixup_begin(), fixup_end(), m_bUsingThumb2);
}