Use the real function address (instead of function address + 8) for the
return address when modifying a jmp_buf to create a new thread context. Also set t12 with the return address. This should fix libc_r on alpha. With much detective work by: Bernd Walter <ticso@cicely.de>
This commit is contained in:
parent
8572518672
commit
2d170746c7
@ -96,8 +96,8 @@
|
||||
#define FP_SAVE_UC(ucp)
|
||||
#define FP_RESTORE_UC(ucp)
|
||||
#define SET_RETURN_ADDR_JB(jb, ra) do { \
|
||||
(jb)[0]._jb[2] = (unsigned long)(ra) + 8UL; \
|
||||
(jb)[0]._jb[R_RA + 4] = 0; \
|
||||
(jb)[0]._jb[2] = (long)(ra); \
|
||||
(jb)[0]._jb[R_RA + 4] = (long)(ra); \
|
||||
(jb)[0]._jb[R_T12 + 4] = (long)(ra); \
|
||||
} while (0)
|
||||
#else
|
||||
|
@ -96,8 +96,8 @@
|
||||
#define FP_SAVE_UC(ucp)
|
||||
#define FP_RESTORE_UC(ucp)
|
||||
#define SET_RETURN_ADDR_JB(jb, ra) do { \
|
||||
(jb)[0]._jb[2] = (unsigned long)(ra) + 8UL; \
|
||||
(jb)[0]._jb[R_RA + 4] = 0; \
|
||||
(jb)[0]._jb[2] = (long)(ra); \
|
||||
(jb)[0]._jb[R_RA + 4] = (long)(ra); \
|
||||
(jb)[0]._jb[R_T12 + 4] = (long)(ra); \
|
||||
} while (0)
|
||||
#else
|
||||
|
@ -96,8 +96,8 @@
|
||||
#define FP_SAVE_UC(ucp)
|
||||
#define FP_RESTORE_UC(ucp)
|
||||
#define SET_RETURN_ADDR_JB(jb, ra) do { \
|
||||
(jb)[0]._jb[2] = (unsigned long)(ra) + 8UL; \
|
||||
(jb)[0]._jb[R_RA + 4] = 0; \
|
||||
(jb)[0]._jb[2] = (long)(ra); \
|
||||
(jb)[0]._jb[R_RA + 4] = (long)(ra); \
|
||||
(jb)[0]._jb[R_T12 + 4] = (long)(ra); \
|
||||
} while (0)
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user