What do the .eh_frame and .eh_frame_hdr sections store, exactly?

后端 未结 1 1637
天涯浪人
天涯浪人 2020-12-13 14:09

I know that, when using languages that support exceptions, such as C++, additional information must be provided to the runtime environment to describe the call frames that m

相关标签:
1条回答
  • 2020-12-13 14:22

    Please, see cfi-directives

    It should cover history and theory of most of the sections in question.

    About eh_frame, it contains exception unwinding and source language information. Each entry in this section is represented by single CFI (call frame information )

    see, eh_frame in linuxfoundation

    eh_frame_hdr, is used by c++ runtime code to access the eh_frame. That means, it contains the pointer and binary search table to efficiently retrieve the information from eh_frame.

    Now, in case you want to see how you read/write this sections then I suggest take a look at following linker code.

    (look for EhFrame.cpp, EhFrameHdr.cpp and EhFrameReader.cpp )

    Good luck !!

    0 讨论(0)
提交回复
热议问题