Skip to main content
Explorer II
September 11, 2023
Solved

eh_frame, init and fini in a C build

  • September 11, 2023
  • 1 reply
  • 1739 views

I see these in the linker scripts, but I do not see them in the output for a C application.

I know eh_frame is for C++ exceptions, and it is not strange it is not in the output of the C application. I also read it is used for some C functionality as well. Can these functionality be used in embedded platforms (without an OS) ? Can I ever see eh_frame in a C build output ?

I thought init and fini is only for processes and shared objects. Neither is in a C project, are these used for anything else ? 

    This topic has been closed for replies.
    Best answer by Issamos

    Hello @mete 

    you might still encounter eh_frame sections if certain C features that require stack unwinding support bit. But, this is going to be rare.

    For init and fini, I don't think they have uses other than what you said.

    Best regards.

    II

    1 reply

    IssamosAnswer
    Graduate II
    September 11, 2023

    Hello @mete 

    you might still encounter eh_frame sections if certain C features that require stack unwinding support bit. But, this is going to be rare.

    For init and fini, I don't think they have uses other than what you said.

    Best regards.

    II

    meteAuthor
    Explorer II
    September 11, 2023

    Thanks @Issamos , is there a documentation about when eh_frame is used in C ? or does C standard or GNU toolchain mandate the support/inclusion of eh_frame ? 

    Graduate II
    September 11, 2023

    I suggest you to take a look at this post.

    Best regards.

    II