@@ -85,6 +85,18 @@ ENTRY(__setcontext)
PSEUDO_END (__setcontext)
weak_alias (__setcontext, setcontext)
+ /* We add an NOP here to separate between __setcontext/__startcontext.
+ The wanted behavior that happens is: when unwinding from a function
+ called inside a makecontext() context, FDE lookup will use
+ '&__startcontext - 1', then returns NULL for no FDE found,
+ and immediately ends the unwind, in a normal fashion.
+
+ If this NOP word does not exist, FDE lookup just repeatedly finds
+ __setcontext's FDE in an infinite loop, due to the convention of
+ using 'address - 1' for FDE lookup. Modifiying/deleting the below
+ __startcontext's FDE has no help on this. */
+ nop
+
ENTRY(__startcontext)
mov r4, r16
bne r4, zero, __setcontext