This is the mail archive of the gcc-patches@gcc.gnu.org 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]

Re: [RFA] Compact EH Patch


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~


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