public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@redhat.com>
To: "Moore, Catherine" <Catherine_Moore@mentor.com>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Cc: "jason@redhat.com" <jason@redhat.com>,
	Matthew Fortune <Matthew.Fortune@imgtec.com>
Subject: Re: [RFA] Compact EH Patch
Date: Tue, 06 Oct 2015 16:12:00 -0000	[thread overview]
Message-ID: <561308BF.7030606@redhat.com> (raw)
In-Reply-To: <FD3DCEAC5B03E9408544A1E416F112420192CBAA07@NA-MBX-04.mgc.mentorg.com>

On 10/06/2015 10:14 AM, Moore, Catherine wrote:
>>> +  switch (pr_index) {
>>> +  case 0:
>>> +      p = read_encoded_value (context, bases->eh_encoding, p,
>> &personality);
>>> +      fs->personality = (_Unwind_Personality_Fn) personality;
>>> +      break;
>>> +  case 1:
>>> +      fs->personality = __gnu_compact_pr1;
>>> +      break;
>>> +  case 2:
>>> +      fs->personality = __gnu_compact_pr2;
>>> +      break;
>>> +  default:
>>> +      fs->personality = NULL;
>>> +  }
>>
>> This is the aspect of this spec about which I am least keen.  The existing
>> method whereby the personality function is explicit in each object file means
>> that we've got automatic version control on data that is private to the object
>> file.
>>
>> That is, if we should ever change the format of the LSDA -- as in fact you are
>> doing here -- then all we need do is change __gcc_personality_v0 to
>> __gcc_personality_v1, and all is well.  One can mix and match object files
>> from different compiler versions and all that is required for correctness is
>> that the runtime libraries must continue to provide all previous versions.
>>
>> What you're doing here doesn't allow the format of index {1,2,3} to *ever*
>> change.  You've fixed it forever, barring abandoning those indices and always
>> using index 0.
>>
>> I know that the ARM EH format made exactly the same mistake, but let's see
>> if we can find some way of not replicating it, eh?
>
> I'm not 100% sure what you are suggesting here.  Would you like to see __gnu_compact_pr2_v0,  etc?
> Are you also saying that you want to see a undefined reference to the personality routine in the object file?

I'm commenting on what I see as a defect in the spec, but not making a specific 
recommendation.

Using __gnu_compact_pr2_v0 etc doesn't help, because you're still using just 2 
bits to reference it.  The only real solution is a symbolic reference from the 
object file, which you get from pr_index == 0.


r~

  reply	other threads:[~2015-10-06 16:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30 21:07 Moore, Catherine
2015-08-14 19:58 ` Moore, Catherine
2015-09-09 20:45 ` Jason Merrill
2015-09-09 23:53   ` Richard Henderson
2015-09-14 19:32     ` Moore, Catherine
2015-09-18 19:34 ` Richard Henderson
2015-10-05 23:14   ` Moore, Catherine
2015-10-06 16:12     ` Richard Henderson [this message]
2015-11-25 17:13   ` Moore, Catherine
2015-12-01 21:32     ` Moore, Catherine
2015-12-01 21:33     ` Jason Merrill
2015-12-02 13:39       ` Jonathan Wakely
2015-12-13 22:12   ` Moore, Catherine
2015-10-28 16:44 ` Matthew Fortune

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=561308BF.7030606@redhat.com \
    --to=rth@redhat.com \
    --cc=Catherine_Moore@mentor.com \
    --cc=Matthew.Fortune@imgtec.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.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).