<div dir="ltr">Ping?</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 11, 2015 at 4:37 PM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I found that Writing and reading Native files from YAML reader is actually tricky. Readers generally don't need a linking context, but writers do. So it's not easy to call a writer from a reader. Seems it needs a plumbing work.<div><br></div><div>Then I tried to convert a YAML file to Native using yaml2obj -format=native. yaml2obj didn't actually support Native format because Native format lives only in LLD. Yet it's intended to be an alternative, hopefully better object file format, it's not supported by anyone except the linker. There's no consumer producing a file in that file format.</div><div><br></div><div>I started feeling I'm just wasting time. There are a lot of other things I need to do to make LLD a production quality linker, and this is not only non-productive but is actually counter-productive. Can you guys approve this patch so that I can submit this now?</div><div><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 11, 2015 at 2:08 PM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Tue, Feb 10, 2015 at 7:27 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><p dir="ltr">I really like this.</p>
<p dir="ltr">Every object file has peculiarities. MachO  has scattered relocations. Mips elf has many in one relocations.</p>
<p dir="ltr">If we, with the handsight of having built a linker, create a rounder wheel, it will be just another file format. We will still have to parse it and report broken files. It will have to be able to represent the constructs that currently use the various features of existing formats, but calling it "native" and requiring direct mapping to it seems counter productive.</p></blockquote></span><div>I totally agree.</div><div><br></div><div>What I'm thinking now is to convert a YAML file to Native and read it back before doing anything to that YAML file, assuming YAML and Native are compatible. YAML reader should be well-tested because there are many tests written in YAML. So that test should be enough to test Native.<br></div><div><div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="gmail_quote"><div><div>On Feb 6, 2015 9:40 PM, "Rui Ueyama" <<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>> wrote:<br type="attribution"></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div>The round-trip passes were introduced in r193300. The intention of<br>
the change was to make sure that LLD is capable of reading end<br>
writing such file formats.<br>
<br>
But that turned out to be yet another over-designed stuff that had<br>
been slowing down everyday development.<br>
<br>
The passes ran after the core linker and before the writer. If you<br>
had an additional piece of information that needs to be passed from<br>
front-end to the writer, you had to invent a way to save the data to<br>
YAML/Native. These passes forced us to do that even if that data<br>
was not needed to be represented neither in an object file nor in<br>
an executable/DSO. It doesn't make sense. We don't need these passes.<br>
<br>
<a href="http://reviews.llvm.org/D7480" target="_blank">http://reviews.llvm.org/D7480</a><br>
<br>
Files:<br>
  include/lld/Passes/RoundTripNativePass.h<br>
  include/lld/Passes/RoundTripYAMLPass.h<br>
  lib/CMakeLists.txt<br>
  lib/Driver/CMakeLists.txt<br>
  lib/Driver/Driver.cpp<br>
  lib/Passes/CMakeLists.txt<br>
  lib/Passes/Makefile<br>
  lib/Passes/RoundTripNativePass.cpp<br>
  lib/Passes/RoundTripYAMLPass.cpp<br>
  lib/ReaderWriter/CMakeLists.txt<br>
  lib/ReaderWriter/CoreLinkingContext.cpp<br>
  lib/ReaderWriter/ELF/CMakeLists.txt<br>
  lib/ReaderWriter/ELF/ELFLinkingContext.cpp<br>
  lib/ReaderWriter/ELF/Makefile<br>
  lib/ReaderWriter/MachO/CMakeLists.txt<br>
  lib/ReaderWriter/MachO/MachOLinkingContext.cpp<br>
  lib/ReaderWriter/PECOFF/CMakeLists.txt<br>
  test/elf/Mips/pc23-range.test<br>
  test/elf/roundtrip.test<br>
  test/lit.cfg<br>
  tools/lld/Makefile<br>
  unittests/DriverTests/Makefile<br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br></div></div>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div>
</blockquote></div></div></div><br></div></div>
</blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>