RFC: Data Format Outputting

Hi all,

There's a small problem that's brewing with the exception handling stuff that some of us have been working on lately. The problem is that different architectures are going to require different data format encodings for different exception handling bits. For example, one architecture may want PCREL for an entry, while another may want PCREL + SDATA4. There is a problem with the comment line for such information in the ASM file. We currently only have a mechanism in place to emit a string as a comment followed by EOL.

The attached patch is an attempt to follow what GCC does. And by attempt, I mean that I whole-sale copied the code over from one of their functions, which returns the string of the format encoding in question.

My RFC is two-fold:

1. Is this okay, in both a legal and moral sense?
2. Is there a better way to do this?


Please note that the patch isn't wonderful. It's more of a proof-of-concept at this point...


designated-inits.diff (14.8 KB)

I do like the basic idea, but that's the kind of stuff that I'm sure Chris has a pretty definite opinion on. And yeah, with the patch I was working up yesterday we're definitely going to need something for the comments - thanks for working on that.