On Tue, 2017-08-29 at 12:25 +0100, Szabolcs Nagy wrote: > > it's a general bug that most ifunc users (e.g. in binutils > tests) declare the ifunc resolvers incorrectly, the correct > prototype is the way the dynamic linker invokes the resolver > in sysdeps/aarch64/dl-irel.h: > > static inline ElfW(Addr) > __attribute ((always_inline)) > elf_ifunc_invoke (ElfW(Addr) addr) > { > return ((ElfW(Addr) (*) (unsigned long int)) (addr)) > (GLRO(dl_hwcap)); > } > > (that argument should be uint64_t for ilp32, but that's a > separate issue) > > in glibc the hwcap is not used, because it has accesses to > cached dispatch info, but in libatomic using the hwcap > argument is the right way.
OK, I changed my patch to use the argument and it did work but since the type of the argument should be uint64_t instead of 'unsigned long int' for aarch64 I think I will send a patch to libc-alpha first to fix this before sending an updated libatomic patch. That way I won't have to update GCC when glibc changes the type. I see that different platforms use different types for the resolver argument so I think I will have to update the libatomic configure.tgt script as well to set the resolver arg type when I resbumit the gcc libatomic patch so that we can have the correct prototype in libatomic_i.h. Steve Ellcey sell...@cavium.com