SLAA534A June 2013 – June 2020
When a throw statement is seen in the source code, the compiler generates a call to a runtime support library function named _ _cxa_throw. When the throw is executed, the return address for the _ _cxa_throw call site is used to identify which function is throwing the exception. The library searches for the return address in the EXIDX table.
Each entry in the table represents the exception handling behavior of a range of program addresses, which may be one or several functions that share exactly the same exception handling behavior. Each entry encodes the start of a program address range, and is considered to cover all program addresses until the address encoded in the next entry. The linker may combine adjacent functions with identical behavior into one entry.
Each entry consists of two 32-bit words. The first word of each entry is a PREL31 field representing the starting program address of the function or functions. Bit 31 of the first word shall be 0. The second word has one of three formats, depending on bit 31 of the second word. If bit 31 is 0, the second word is a either a PREL31 pointer to an EXTAB entry somewhere else in memory or the special value EXIDX_CANTUNWIND. If bit 31 is 1, the second word is an inlined EXTAB entry. These three formats are detailed in the subsections that follow.