ELF sections

To see a list of all of the sections, use the following command:

> readelf -SW a.out

This will result in the following output:

As shown, even in a simple example, there are several sections. Some of these sections contain information that has already been talked about in previous chapters:

  • eh_frame/.eh_frame_hdr: These contain the FDE information for reversing the stack when dealing with exceptions, as just discussed. The eh_frame_hdr section contains additional information for improving the performance of C++ exceptions, including a hash table that can be used to locate an FDE instead of looping through the list of FDEs (which ...

Get Hands-On System Programming with C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.