What do the CFI directives mean? (and some more questions)

后端 未结 3 990
旧时难觅i
旧时难觅i 2021-01-04 01:35

Ok, this is gonna be a long question. I\'m trying to understand how \"buffer overflow\" works. I am reading Smashing the stack for fun and profit by aleph1 and have just got

3条回答
  •  粉色の甜心
    2021-01-04 01:55

    CFI stands for call frame information. It's the way the compiler describes what happens in a function. It can be used by the debugger to present a call stack, by the linker to synthesise exceptions tables, for stack depth analysis and other things like that.

    Effectively, it describes where resources such as processor registers are stored and where the return address is.

    CFA stands for call frame address, which mean the address the stack pointer location of the caller function. This is needed to pick up information about the next frame on the stack.

提交回复
热议问题