public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Szabolcs Nagy <szabolcs.nagy@arm.com>
To: sellcey@cavium.com, gcc-patches@gcc.gnu.org
Cc: nd@arm.com
Subject: Re: [PATCH][aarch64] Enable ifunc resolver attribute by default
Date: Mon, 04 Sep 2017 14:40:00 -0000	[thread overview]
Message-ID: <59AD65EC.3020906@arm.com> (raw)
In-Reply-To: <201706121502.v5CF2Lj1000567@sellcey-dt.caveonetworks.com>

On 12/06/17 16:02, Steve Ellcey wrote:
> 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?
> 

this is not the right default for bionic, uclibc and musl

(gcc does not distinguish between supporting ifunc in the
compiler vs runtime, so when ifunc is enabled it is assumed
the c runtime will have support too, hence libatomic and
libgcc starts using ifuncs which breaks at runtime)

so don't change the default if target matches
*-*-*android*|*-*-*uclibc*|*-*-*musl*)

(i think the default should be kept "no" for these targets
independently of cpu arch, so the current logic that is
repeated many places in config.gcc is suboptimal.

and i think the attribute syntax should be always supported
and this setting should only mean that ifunc use is allowed
in the runtime libraries.)

  reply	other threads:[~2017-09-04 14:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-12 15:02 Steve Ellcey
2017-09-04 14:40 ` Szabolcs Nagy [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59AD65EC.3020906@arm.com \
    --to=szabolcs.nagy@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=nd@arm.com \
    --cc=sellcey@cavium.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).