diff --git a/src/base/SMPBasicBlock.cpp b/src/base/SMPBasicBlock.cpp index faf0c46123a7b279028265fbf6811447f31e9cfe..c75e97192d9a81fcc9712a2f8141eaa5490e4523 100644 --- a/src/base/SMPBasicBlock.cpp +++ b/src/base/SMPBasicBlock.cpp @@ -462,7 +462,7 @@ list<SMPBasicBlock *>::iterator SMPBasicBlock::GetFallThroughSucc(void) { SMPInstr *LastInst = (*LastInstIter); SMPitype LastDataFlow = LastInst->GetDataFlowType(); - if ((JUMP != LastDataFlow) && (RETURN != LastDataFlow) && (HALT != LastDataFlow) && (!LastInst->IsFixedCallJump())) { + if ((JUMP != LastDataFlow) && (INDIR_JUMP != LastDataFlow) && (RETURN != LastDataFlow) && (HALT != LastDataFlow) && (!LastInst->IsFixedCallJump())) { // Block has fall-through. STARS_InstructionID_t NextInstID = LastInst->GetInstID().GetInstruction()->GetNextInstructionID(); STARS_ea_t FallThroughSuccAddr = NextInstID.GetIDWithinFile(); diff --git a/src/base/SMPFunction.cpp b/src/base/SMPFunction.cpp index e11739e28823fb34f54f6d8dbf477736a5629553..360054725cb219565c73eb646b684c88aa0b1676 100644 --- a/src/base/SMPFunction.cpp +++ b/src/base/SMPFunction.cpp @@ -3858,8 +3858,10 @@ void SMPFunction::DetectLinkerStubFunction(void) { // have two basic blocks, with the second block being reached only by an indirect jump from // the first block (which happens through the PLT, but we are not checking that here), and then // the second block ending with a tail call jump, with no return instruction in the func. - if (this->RPOBlocks[0]->HasIndirectJump() - && ((1 == this->GetNumBlocks()) || this->RPOBlocks[this->GetNumBlocks() - 1]->EndsWithTailCall())) { + bool IDA_PLT = (this->RPOBlocks[0]->HasIndirectJump() + && ((1 == this->GetNumBlocks()) || this->RPOBlocks[this->GetNumBlocks() - 1]->EndsWithTailCall())); + bool IRDB_PLT = ((1 == this->GetNumBlocks()) && this->RPOBlocks[0]->EndsWithTailCall()); + if (IDA_PLT || IRDB_PLT) { this->LinkerStub = true; SMP_msg("INFO: Linker stub function found at %llx \n", (unsigned long long) this->GetFirstFuncAddr()); }