diff --git a/lib/libc/powerpc/gen/_ctx_start.S b/lib/libc/powerpc/gen/_ctx_start.S index 70b4a9d91c8..d6445941168 100644 --- a/lib/libc/powerpc/gen/_ctx_start.S +++ b/lib/libc/powerpc/gen/_ctx_start.S @@ -48,6 +48,6 @@ 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) + END(_ctx_start) .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc64/gen/_ctx_start.S b/lib/libc/powerpc64/gen/_ctx_start.S index 17ec44e739c..f946464c8c5 100644 --- a/lib/libc/powerpc64/gen/_ctx_start.S +++ b/lib/libc/powerpc64/gen/_ctx_start.S @@ -32,8 +32,11 @@ .globl CNAME(abort) ENTRY(_ctx_start) +#if !defined(_CALL_ELF) || _CALL_ELF == 1 + /* Load values from function descriptor */ ld %r2,8(%r14) ld %r14,0(%r14) +#endif mtlr %r14 blrl /* branch to start function */ mr %r3,%r15 /* pass pointer to ucontext as argument */