This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PowerPC: Simplify code for accessing powerpc GOT


Will Schmidt <will_schmidt@vnet.ibm.com> writes:

> diff --git a/sysdeps/powerpc/powerpc32/dl-start.S b/sysdeps/powerpc/powerpc32/dl-start.S
> index ae41f47..9f84a48 100644
> --- a/sysdeps/powerpc/powerpc32/dl-start.S
> +++ b/sysdeps/powerpc/powerpc32/dl-start.S
> @@ -1,5 +1,6 @@
>  /* Machine-dependent ELF startup code.  PowerPC version.
> -   Copyright (C) 1995-2000, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
> +   Copyright (C) 1995-2000, 2002, 2004, 2005, 2006, 2011
> +	Free Software Foundation, Inc.
>     This file is part of the GNU C Library.
>  
>     The GNU C Library is free software; you can redistribute it and/or
> @@ -47,8 +48,7 @@ _dl_start_user:
>     passed by value!).  */
>  
>  /*  Put our GOT pointer in r31, */
> -	bcl	20,31,1f
> -1:	mflr	r31
> +	SETUP_GOT_ACCESS(r31)
>  	addis	r31,r31,_GLOBAL_OFFSET_TABLE_-1b@ha
>  	addi	r31,r31,_GLOBAL_OFFSET_TABLE_-1b@l

That is too fragile.  The label name should be a macro argument.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]