From: Jakub Jelinek <jakub@redhat.com>
To: Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Cc: gcc-patches@gcc.gnu.org, vogt@linux.vnet.ibm.com
Subject: Re: [PATCH] S390: Hotpatching fixes.
Date: Fri, 27 Mar 2015 09:37:00 -0000 [thread overview]
Message-ID: <20150327093705.GK1746@tucnak.redhat.com> (raw)
In-Reply-To: <5515233E.2010406@linux.vnet.ibm.com>
On Fri, Mar 27, 2015 at 10:30:38AM +0100, Andreas Krebbel wrote:
> At a second glance it is not really clear to me why we disable hotpatching for nested functions at
> all. While it is probably a bit difficult to actually hotpatch them I don't see why we should
> prevent it. We probably just copied that over from the x86 ms_hook_prologue attribute implementation:
>
> static bool
> ix86_function_ms_hook_prologue (const_tree fn)
> {
> if (fn && lookup_attribute ("ms_hook_prologue", DECL_ATTRIBUTES (fn)))
> {
> if (decl_function_context (fn) != NULL_TREE)
> error_at (DECL_SOURCE_LOCATION (fn),
> "ms_hook_prologue is not compatible with nested function");
> else
> return true;
> }
> return false;
> }
>
> Also the kernel guys (one of the main users of that feature) confirmed that they in principle prefer
> hotpatching to behave more like -pg and -pg does insert an mcount call for nested functions.
> (Although I would be surprised to hear of nested functions in the Linux kernel).
>
> So I'm inclined to just remove that special handling of nested functions.
Agreed, I also wondered what would be so special about nested functions
here.
Sure, one could hotpatch them with code clobbering the static chain
register, but that wouldn't be a gcc issue.
Jakub
prev parent reply other threads:[~2015-03-27 9:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-05 12:40 Dominik Vogt
2015-03-09 11:22 ` Dominik Vogt
2015-03-09 11:30 ` Jakub Jelinek
2015-03-09 12:19 ` Dominik Vogt
2015-03-26 20:56 ` Jakub Jelinek
2015-03-27 9:30 ` Andreas Krebbel
2015-03-27 9:37 ` Jakub Jelinek [this message]
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=20150327093705.GK1746@tucnak.redhat.com \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=krebbel@linux.vnet.ibm.com \
--cc=vogt@linux.vnet.ibm.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).