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

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 13 21:01:32 PDT 2015


On Thu, Aug 13, 2015 at 8:42 PM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> I am the one doing most of the work on ELF,


I'm not sure how you guys have decided on divvying up the work, but as a
person that works within earshot of Michael, it seems that a significant
factor to that is that many of the changes you make are antagonistic to the
changes he is trying to make. Deleting dead code that is used by the patch
he is trying to land or


> 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.

-- Sean Silva


> in assembly.
>
>
> On 13 August 2015 at 23:38, Sean Silva <chisophugis at gmail.com> wrote:
> >
> >
> > On Thu, Aug 13, 2015 at 6:03 PM, Rafael EspĂ­ndola
> > <rafael.espindola at gmail.com> wrote:
> >>
> >> >> llvm-mc
> >> > This is testing explicit relocations. Assembly doesn't represent
> >> > specific relocations, and it's not obvious what gets generated.
> >>
> >> This test is using a valid file that can be created with assembly.
> >> YAML is an unnecessary LLVM only invention here. Use assembly.
> >
> >
> > The YAML format may be an LLVM-only invention, but R_X86_64_PC32,
> SHT_RELA,
> > etc. are not. Anybody that understands the input format of the linker
> will
> > reasonably understand what is in the YAML file just based on those
> > waypoints. The same is not true for assembly (or  rather, "gas
> directives").
> >
> > I personally have have a very hard time understanding your assembly test
> > cases; I think Michael does too. I think most people would have a hard
> time
> > since they don't really have any "assembly" content; they are basically a
> > soup of "gas directives". It's not "assembly" vs. "YAML"; it's "gas
> > directives (with whatever LLVM extensions)" vs "YAML". Judging by the
> > complete absence of assembly in test/COFF, I assume Rui also prefers
> > something tied directly to the object format.
> >
> > @Rui, as the code owner here, do you think we should stick with YAML for
> the
> > relocation tests?
> >
> > -- Sean Silva
> >
> >>
> >>
> >> Cheers,
> >> Rafael
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150813/83d452e8/attachment.html>


More information about the llvm-commits mailing list