This is the mail archive of the mailing list for the GCC 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]

[PATCH][aarch64] Enable ifunc resolver attribute by default

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

2017-06-12  Steve Ellcey  <>

	* 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"
+	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"

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