Developer Guide and Reference

Contents

Optimize Exception Handling Data
(Linux* and
macOS*
)

If a program requires support for exception handling, the compiler creates a special section containing DWARF directives that are used by the Linux*
and
macOS*
run-time to unwind and catch an exception.
This information is located in the .eh_frame section and may be shrunk using the compiler options listed below.
Options to specify:
Linux*
and
macOS*
:
-fno-exceptions
-fno-asynchronous-unwind-tables
Windows*:
None
Advantages of this method:
  • These options may shrink the size of the object or binary file by up to 15%, though the amount of the reduction depends on the target platform.
  • These options control whether unwind information is precise at an instruction boundary or at a call boundary. For example, option
    -fno-asynchronous-unwind-tables
    can be used for programs that may
    only
    throw or catch exceptions.
Disadvantages of this method:
Both options may change the program's behavior:
  • Do not use option
    -fno-exceptions
    for programs that require standard C++ handling for objects of classes with destructors.
  • Do not use option
    -fno-asynchronous-unwind-tables
    for functions compiled with option
    -fexceptions
    or option
    -traceback
    that contain calls to other functions that might throw exceptions or for C++ functions that declare objects with destructors.
Please read the compiler option descriptions, which explain what the defaults and behavior are for each target platform.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804