Skip to content

vc call function not directly, they all via jmp table #3

@bbqz007

Description

@bbqz007

when you see in the disassembly, you would find vc calls jump to the jmp tables why the calls can be hooked.
a virtual method call in the vc disassemby code, it first jump to the jmp table and then access the virtual table.
a non-virtual method call at first jump to the jmp table and then jmp to actual text code.
when call the a virtual method directly like you do, the disassembly code skip the first jump and directly access the virtual table pointer. thus you think it beats the non-virtual method calls.

and gcc implements virtual table pointer very different from vc, it may generate branches. calling virtual method like you supposed may beats nonvirt method more much. but that is not the fact.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions