This is an archive of the discontinued LLVM Phabricator instance.

LLD: Remove YAML/Native round-trip passes
Needs ReviewPublic

Authored by ruiu on Feb 6 2015, 6:39 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

The round-trip passes were introduced in r193300. The intention of
the change was to make sure that LLD is capable of reading end
writing such file formats.

But that turned out to be yet another over-designed stuff that had
been slowing down everyday development.

The passes ran after the core linker and before the writer. If you
had an additional piece of information that needs to be passed from
front-end to the writer, you had to invent a way to save the data to
YAML/Native. These passes forced us to do that even if that data
was not needed to be represented neither in an object file nor in
an executable/DSO. It doesn't make sense. We don't need these passes.

Diff Detail

Event Timeline

ruiu updated this revision to Diff 19525.Feb 6 2015, 6:39 PM
ruiu retitled this revision from to LLD: Remove YAML/Native round-trip passes.
ruiu updated this object.
ruiu edited the test plan for this revision. (Show Details)
ruiu added a project: lld.
ruiu added a subscriber: Unknown Object (MLST).

I support this, but I'd like to see the input roundtrip tests be added before we remove this.

I really like this.

Every object file has peculiarities. MachO has scattered relocations. Mips
elf has many in one relocations.

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.

lib/ReaderWriter/PECOFF/CMakeLists.txt