public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][aarch64] Enable ifunc resolver attribute by default
@ 2017-06-12 15:02 Steve Ellcey
  2017-09-04 14:40 ` Szabolcs Nagy
  0 siblings, 1 reply; 6+ messages in thread
From: Steve Ellcey @ 2017-06-12 15:02 UTC (permalink / raw)
  To: gcc-patches

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
sellcey@cavium.com



2017-06-12  Steve Ellcey  <sellcey@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"

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-09-22 18:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-12 15:02 [PATCH][aarch64] Enable ifunc resolver attribute by default Steve Ellcey
2017-09-04 14:40 ` Szabolcs Nagy
2017-09-05 17:09   ` Steve Ellcey
2017-09-05 17:20     ` Szabolcs Nagy
2017-09-21 12:37     ` Joseph Myers
2017-09-22 18:06       ` Steve Ellcey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).