<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">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><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> <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 class="h5">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 class="h5">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><br></div></div>