I recently noticed that the GCC 'resolver' attribute used for ifunc's is not
on by default for aarch64 even though all the infrastructure to support it is
in place.  I made memcpy an ifunc on aarch64 in glibc and am looking at
possibly using it for libatomic too.  For this reason I would like to enable
it by default.  Note that the memcpy ifunc works even when this is not enabled
because glibc enables ifuncs by using the assembly language .type psuedo-op to
set the resolver attribute when GCC cannot do it with an attribute.  Using
an ifunc in libatomic does require this to be enabled and I do not see any
reason not to have it enabled by default.

Tested with no regressions, OK to check in?

Steve Ellcey
sell...@cavium.com



2017-06-12  Steve Ellcey  <sell...@cavium.com>

        * config.gcc (aarch64*-*-linux*): Enable IFUNC by default.


diff --git a/gcc/config.gcc b/gcc/config.gcc
index a311cd95..e4caca4 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -974,6 +974,7 @@ aarch64*-*-freebsd*)
        tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-freebsd"
        ;;
 aarch64*-*-linux*)
+       default_gnu_indirect_function=yes
        tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
        tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-linux.h"
        tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-linux"

Reply via email to