[PATCH] D11612: [lld][ELF2] Apply relocations.

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 13 22:46:27 PDT 2015


On Fri, Aug 14, 2015 at 7:01 AM, Sean Silva <chisophugis at gmail.com> wrote:
>
> On Thu, Aug 13, 2015 at 8:42 PM, Rafael EspĂ­ndola
> <rafael.espindola at gmail.com> wrote:
>>
>> I am *totally* opposed to
>> *ever* having a YAML test that can be written in assembly.
>>
>> If I can understand that entire YAML gunk is:
>>
>> foo:
>> .section bar
>>         call foo
>>
> I like seeing bytes and symbolized ELF spec names. That is what I know best.
> That is what anybody working on this linker will know. I don't know all the
> weird corners of gas syntax (+ LLVM extensions apparently), nor would I
> expect any linker developer to know that. I *would* expect any linker
> developer to know the symbolic constants (or at least be able to easily
> google them).
>
> The YAML file directly expresses the intent; yes there is lots of "gunk"
> surrounding it, but any linker developer knows how to skim that based on
> knowing the meaning of the symbolic constants. Do you find it hard to
> navigate the YAML files? We can improve the format if necessary if there is
> a particular pain point or two.
>
> To put it another way, every "gas directives" file I see in the test
> directory, my immediate reaction is wanting to assemble it and readobj it to
> see what it "actually" is feeding to the linker. I particularly like the
> YAML because like readobj output, it is telling you pretty straight up what
> is there. One doesn't need to guess what flags the assembler set on that
> section, whether a particular relocation kind actually ends up in the
> output, etc. You just see it immediately in your editor.

I totally agreed with Sean Silva. The largest number of YAML tests are
MIPS related.
Yes, some of them were written in YAML just because at the moment of creation
llvm-mc did not support all necessary MIPS instruction and directives. Now I
would write some tests using assembly but only a few of them. Does everybody
know MIPS assembly directives? Otherwise it will be difficult to investigate/fix
failed tests because. YAML is more verbose but clear and understandable.

And as to me a real nightmare is using binary inputs in linker's tests.
If such tests failed I have to parse the binary using objdump/readobj tools
to understand what happens.

-- 
Simon Atanasyan


More information about the llvm-commits mailing list