mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
SH: makecontext/.Lexitcode: Always initialize the GOT register before use.
This is only relevant when returning from a context with »uc_link == NULL«, which is not exercised in the testsuite.
This commit is contained in:
@ -1,5 +1,8 @@
|
|||||||
2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
|
2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/sh/makecontext.S (.Lexitcode): Always
|
||||||
|
initialize the GOT register before use.
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/sh/makecontext.S (__makecontext): Fix
|
* sysdeps/unix/sysv/linux/sh/makecontext.S (__makecontext): Fix
|
||||||
calculation of ARGC > 4.
|
calculation of ARGC > 4.
|
||||||
|
|
||||||
|
@ -97,22 +97,26 @@ ENTRY(__makecontext)
|
|||||||
|
|
||||||
.align 5
|
.align 5
|
||||||
.Lexitcode:
|
.Lexitcode:
|
||||||
tst r8, r8 /* ucb->uc_link == NULL? */
|
|
||||||
bt/s 2f
|
|
||||||
mov r8, r4 /* r4 <- ucb->uc_link */
|
|
||||||
#ifdef PIC
|
#ifdef PIC
|
||||||
mova .Lgot, r0
|
mova .Lgot, r0
|
||||||
mov.l .Lgot, r12
|
mov.l .Lgot, r12
|
||||||
add r0, r12
|
add r0, r12
|
||||||
|
#endif
|
||||||
|
tst r8, r8 /* ucb->uc_link == NULL? */
|
||||||
|
bt/s 2f
|
||||||
|
mov r8, r4 /* r4 <- ucb->uc_link */
|
||||||
mov.l .Lsetcontext, r1
|
mov.l .Lsetcontext, r1
|
||||||
|
#ifdef PIC
|
||||||
bsrf r1
|
bsrf r1
|
||||||
.LPCS0:
|
.LPCS0:
|
||||||
nop
|
nop
|
||||||
#else
|
#else
|
||||||
mov.l .Lsetcontext, r1
|
|
||||||
jsr @r1
|
jsr @r1
|
||||||
nop
|
nop
|
||||||
#endif
|
#endif
|
||||||
|
/* If this returns (which can happen if the syscall fails) we'll exit
|
||||||
|
the program with the return error value (-1). */
|
||||||
|
|
||||||
2:
|
2:
|
||||||
mov.l .Lexit, r1
|
mov.l .Lexit, r1
|
||||||
#ifdef PIC
|
#ifdef PIC
|
||||||
|
Reference in New Issue
Block a user