Patchwork [aarch64] Change argument type passed to ifunc resolvers

login
register
mail settings
Submitter Steve Ellcey
Date Aug. 31, 2017, 4 p.m.
Message ID <1504195258.3182.13.camel@cavium.com>
Download mbox | patch
Permalink /patch/22450/
State New
Headers show

Comments

Steve Ellcey - Aug. 31, 2017, 4 p.m.
This is a one line patch split out from:

https://sourceware.org/ml/libc-alpha/2017-08/msg01310.html

It just changes the type of the argument passed to ifunc resolvers from
'unsigned int long' to 'uint64_t'.  This should make no difference for
the existing LP64 ABI but will also work for the new ILP32 ABI.  I
would like to check this in before submitting a patch to GCC that uses
IFUNCs in libatomic so that the types agree.

Tested on aarch64, OK to checkin?

Steve Ellcey
sellcey@cavium.com



2017-08-31  Steve Ellcey  <sellcey@cavium.com>

	* sysdeps/aarch64/dl-irel.h: (elf_ifunc_invoke): Change argument type
	in resolver call.
Szabolcs Nagy - Aug. 31, 2017, 5:09 p.m.
On 31/08/17 17:00, Steve Ellcey wrote:
> This is a one line patch split out from:
> 
> https://sourceware.org/ml/libc-alpha/2017-08/msg01310.html
> 
> It just changes the type of the argument passed to ifunc resolvers from
> 'unsigned int long' to 'uint64_t'.  This should make no difference for
> the existing LP64 ABI but will also work for the new ILP32 ABI.  I
> would like to check this in before submitting a patch to GCC that uses
> IFUNCs in libatomic so that the types agree.
> 
> Tested on aarch64, OK to checkin?
> 

OK for master.

> Steve Ellcey
> sellcey@cavium.com
> 
> 
> 
> 2017-08-31  Steve Ellcey  <sellcey@cavium.com>
> 
> 	* sysdeps/aarch64/dl-irel.h: (elf_ifunc_invoke): Change argument type
> 	in resolver call.
> 
> 
> diff --git a/sysdeps/aarch64/dl-irel.h b/sysdeps/aarch64/dl-irel.h
> index 4a80275..a794c82 100644
> --- a/sysdeps/aarch64/dl-irel.h
> +++ b/sysdeps/aarch64/dl-irel.h
> @@ -31,7 +31,7 @@ static inline ElfW(Addr)
>  __attribute ((always_inline))
>  elf_ifunc_invoke (ElfW(Addr) addr)
>  {
> -  return ((ElfW(Addr) (*) (unsigned long int)) (addr)) (GLRO(dl_hwcap));
> +  return ((ElfW(Addr) (*) (uint64_t)) (addr)) (GLRO(dl_hwcap));
>  }
>  
>  static inline void
>

Patch

diff --git a/sysdeps/aarch64/dl-irel.h b/sysdeps/aarch64/dl-irel.h
index 4a80275..a794c82 100644
--- a/sysdeps/aarch64/dl-irel.h
+++ b/sysdeps/aarch64/dl-irel.h
@@ -31,7 +31,7 @@  static inline ElfW(Addr)
 __attribute ((always_inline))
 elf_ifunc_invoke (ElfW(Addr) addr)
 {
-  return ((ElfW(Addr) (*) (unsigned long int)) (addr)) (GLRO(dl_hwcap));
+  return ((ElfW(Addr) (*) (uint64_t)) (addr)) (GLRO(dl_hwcap));
 }
 
 static inline void