[klibc] [PATCH] ppc64: ELFv2: Load TOC value in system call stub

Alan Modra amodra at gmail.com
Tue Sep 9 19:50:38 PDT 2014


On Tue, Sep 09, 2014 at 07:17:19PM -0300, Mauricio Faria de Oliveira wrote:
>  usr/klibc/arch/ppc64/sysstub.ph |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/usr/klibc/arch/ppc64/sysstub.ph b/usr/klibc/arch/ppc64/sysstub.ph
> index b3f6e38..a0c6d41 100644
> --- a/usr/klibc/arch/ppc64/sysstub.ph
> +++ b/usr/klibc/arch/ppc64/sysstub.ph
> @@ -18,6 +18,9 @@ sub make_sysstub($$$$$@) {
>  #if _CALL_ELF == 2
>  	.type ${fname},\@function
>  ${fname}:
> +0:	addis	2,12,(.TOC.-0b)\@ha
> +	addi	2,2,(.TOC.-0b)\@l
> +	.localentry ${fname},.-${fname}
>  #else
>  	.section ".opd","aw"
>  	.balign 8
> -- 
> 1.7.1

Looks good.

-- 
Alan Modra
Australia Development Lab, IBM


More information about the klibc mailing list