[PATCH] Add ifunc memcpy and memmove for aarch64
Steve Ellcey
sellcey@caviumnetworks.com
Tue Jan 24 20:49:00 GMT 2017
Never mind. Â I fixed this by moving the definition of dl_platform_init
up earlier in the file. Â That, plus including cpu-features.c fixed the
build.
Steve
On Tue, 2017-01-24 at 11:34 -0800, Steve Ellcey wrote:
>Â
> I added this code to sysdeps/aarch64/dl-machine.h but when I added it
> I
> got a build error. Â I am using the same prototype for
> dl_platform_init
> that x86 has so I am not sure why I get this error.
>
> Steve Ellcey
> sellcey@caviumnetworks.com
>
>
> diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-
> machine.h
> index 84b8aec..7f38a68 100644
> --- a/sysdeps/aarch64/dl-machine.h
> +++ b/sysdeps/aarch64/dl-machine.h
> @@ -426,4 +426,20 @@ elf_machine_lazy_rel (struct link_map *map,
> Â Â Â Â Â _dl_reloc_bad_type (map, r_type, 1);
> Â }
> Â
> +#define DL_PLATFORM_INIT dl_platform_init ()
> +
> +static inline void __attribute__ ((unused))
> +dl_platform_init (void)
> +{
> +Â Â if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0')
> +    /* Avoid an empty string which would disturb us.  */
> +Â Â Â Â GLRO(dl_platform) = NULL;
> +
> +#ifdef SHARED
> +Â Â /* init_cpu_features has been called early from __libc_start_main
> in
> +     static executable.  */
> +Â Â init_cpu_features (&GLRO(dl_aarch64_cpu_features));
> +#endif
> +}
> +
> Â #endif
>
>
>
> The error I get is:
>
> In file included from dynamic-link.h:92:0,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â from dl-conflict.c:59:
> ../sysdeps/aarch64/dl-machine.h: In function â_dl_resolve_conflictsâ:
> ../sysdeps/aarch64/dl-machine.h:432:1: error: invalid storage class
> for function âdl_platform_initâ
> Â dl_platform_init (void)
> Â ^~~~~~~~~~~~~~~~
> ../o-iterator.mk:9: recipe for target '/home/ubuntu/sellcey/glibc-
> ifunc-new/obj-glibc64/elf/dl-conflict.o' failed
> make[2]: *** [/home/ubuntu/sellcey/glibc-ifunc-new/obj-
> glibc64/elf/dl-conflict.o] Error 1
More information about the Libc-alpha
mailing list