[PATCH] D50761: [yaml2obj] - Teach tool to produce SHT_GROUP section with a custom type.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 15 04:18:40 PDT 2018
grimar marked an inline comment as done.
grimar added a comment.
> Is it normal for yaml2obj to only parse hex values and not decimal for other fields?
I think usually it allows any numeric values, but I think it is reasonable for this place to allow only hex values.
Here we have a field that expect either section name or named constant. For example, we have the following ones:
> enum : unsigned {
>
> GRP_COMDAT = 0x1,
> GRP_MASKOS = 0x0ff00000,
> GRP_MASKPROC = 0xf0000000
>
> };
(http://www.sco.com/developers/gabi/2001-04-24/ch4.sheader.html#section_group_flags)
So I see why we might want to use section name, the name of the constant and (now) hex value of constant,
but I am not sure it worth to support decimals here. If that field would accept only numeric values, then it would
make much more sense.
================
Comment at: test/tools/yaml2obj/elf-comdat-broken.yaml:30
+# CHECK-NEXT: Signature: foo
+# CHECK-NEXT: Section(s) in group [
+# CHECK-NEXT: ]
----------------
jhenderson wrote:
> Maybe it's worth having two invalid values, so that the second one is interpreted as a section index? What do you think?
It is problematic to have the second value to be invalid because llvm-readobj refuses to parse the `Groups` then:
"Error reading file: invalid section index".
I added one more valid hex value though.
https://reviews.llvm.org/D50761
More information about the llvm-commits
mailing list