diff options
Diffstat (limited to 'gcc/config/arm/unwind-arm.c')
-rw-r--r-- | gcc/config/arm/unwind-arm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/config/arm/unwind-arm.c b/gcc/config/arm/unwind-arm.c index 7bae7437ad5..90fb8527271 100644 --- a/gcc/config/arm/unwind-arm.c +++ b/gcc/config/arm/unwind-arm.c @@ -379,6 +379,13 @@ get_eit_entry (_Unwind_Control_Block *ucbp, _uw return_address) const __EIT_entry * eitp; int nrec; + /* The return address is the address of the instruction following the + call instruction (plus one in thumb mode). If this was the last + instruction in the function the address will lie in the following + function. Subtract 2 from the address so that it points within the call + instruction itself. */ + return_address -= 2; + if (__gnu_Unwind_Find_exidx) { eitp = (const __EIT_entry *) __gnu_Unwind_Find_exidx (return_address, |