This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Use of .eh_frame_hdr, .eh_frame & .gcc_except_table in Linker Script.


I am trying to explore GCC Linker Script as much as possible. I do not
know anything about ELF , DWARF or STAB (newbie to all that). Now, I
have a default Linker script for Bare Metal ELF toolchain, where I am
trying to understand the usage of the below sections:


  .eh_frame_hdr         : { *(.eh_frame_hdr) } >MEM_L1_DATA_A
  .eh_frame               : ONLY_IF_RO { KEEP (*(.eh_frame)) } >MEM_L1_DATA_A
  .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table
.gcc_except_table.*) } >MEM_L1_DATA_A
  /* Adjust the address for the data segment.  We want to adjust up to
     the same address within the page on the next page up.  */
  . = ALIGN(0x1000) + (. & (0x1000 - 1));
  /* Exception handling  */
  .eh_frame               : ONLY_IF_RW { KEEP (*(.eh_frame)) } >MEM_L1_DATA_A
  .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table
.gcc_except_table.*) } >MEM_L1_DATA_A


What is the importance of eh_frame_hdr , eh_frame sections,
.gcc_except_table and why are they written with different Read / Write
properties. Again my toolchain is pure bare metal, so do I really need
those?
Where can I find a high level explanation of what they mean and their use?

Thanks.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]