[PATCH] D75123: [obj2yaml, yaml2obj] - Read and dump the "Content" key of the RawContentSection section as array.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 28 02:37:44 PST 2020


grimar added a comment.

In D75123#1897567 <https://reviews.llvm.org/D75123#1897567>, @jhenderson wrote:

> In D75123#1897411 <https://reviews.llvm.org/D75123#1897411>, @grimar wrote:
>
> > In D75123#1896131 <https://reviews.llvm.org/D75123#1896131>, @MaskRay wrote:
> >
> > > How about the following plan?
> > >
> > > 1. This patch: supporting both `[0,1]` and `"3031"` (hex pairs) in yaml2obj. Support `[0x00, 0x01]` in obj2yaml. Only obj2yaml tests need to be updated. There are only a few.
> > > 2. A future change: change `"3031"` (hex pairs) to `"01"` (strings) in yaml2obj. ~180 tests need to be migrated. This can probably be done mechanically with a dedicated tool.
> >
> >
> > I did not understand it I think.
> >  Currectly we support hex pairs, like "00112233". This patch suggests "`[0x00, 0x01]`" instead. Not sure I understand what do you mean by "strings" in (2)? I.e. what is the difference with "pairs" we have?
>
>
> I might be completely misreading this, but i think @MaskRay is suggesting to get something like the string "foo" in a string table, for example, writing literally that instead of `666f6f`.


Looks true. I did not get that 0x30 is 1 and 0x31 is 2 from ASCII.
(And it is very far from what this patch initially suggested.)

I am not sure why we might want strings. Usually we describe a binary context of
sections isn't? e,g. custom symbol tables, custom text sections (with broken instructions) for broken test cases etc.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75123/new/

https://reviews.llvm.org/D75123





More information about the llvm-commits mailing list