diff options
Diffstat (limited to 'lib/libc/powerpc/gen/_ctx_start.S')
-rw-r--r-- | lib/libc/powerpc/gen/_ctx_start.S | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/libc/powerpc/gen/_ctx_start.S b/lib/libc/powerpc/gen/_ctx_start.S index 4b9fc1d53ae0..70b4a9d91c8c 100644 --- a/lib/libc/powerpc/gen/_ctx_start.S +++ b/lib/libc/powerpc/gen/_ctx_start.S @@ -35,11 +35,18 @@ mtlr %r14 blrl /* branch to start function */ mr %r3,%r15 /* pass pointer to ucontext as argument */ - bl PIC_PLT(CNAME(_ctx_done)) /* branch to ctxt completion func */ + bl CNAME(_ctx_done) /* branch to ctxt completion func */ + /* * we should never return from the * above branch. */ + /* Don't bother saving off %r30, we're already in a bad state. */ + bcl 20,31,1f +1: mflr %r30 + mr %r3,%r30 # save for _DYNAMIC + addis %r30,%r30,_GLOBAL_OFFSET_TABLE_-1b@ha + addi %r30,%r30,_GLOBAL_OFFSET_TABLE_-1b@l bl PIC_PLT(CNAME(abort)) /* abort */ END(_cts_start) |