summaryrefslogtreecommitdiffstats
path: root/lld/docs
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2015-04-10 21:23:51 +0000
committerRui Ueyama <ruiu@google.com>2015-04-10 21:23:51 +0000
commitaa7b304ea7788ecd95856570c88d4ecfafeae475 (patch)
treec99cf787af61e25ed73316e612885f13755cd203 /lld/docs
parentbd5ae6b4de63bffdfb34cc22313c50d1a0a8260e (diff)
downloadbcm5719-llvm-aa7b304ea7788ecd95856570c88d4ecfafeae475.tar.gz
bcm5719-llvm-aa7b304ea7788ecd95856570c88d4ecfafeae475.zip
Remove the Native file format.
The Native file format was designed to be the fastest on-memory or on-disk file format for object files. The problem is that no one is working on that. No LLVM tools can produce object files in the Native, thus the feature of supporting the format is useless in the linker. This patch removes the Native file support. We can add it back if we really want it in future. llvm-svn: 234641
Diffstat (limited to 'lld/docs')
-rw-r--r--lld/docs/Readers.rst7
-rw-r--r--lld/docs/design.rst49
-rw-r--r--lld/docs/index.rst2
3 files changed, 4 insertions, 54 deletions
diff --git a/lld/docs/Readers.rst b/lld/docs/Readers.rst
index e00406b8c4c..f9499635b72 100644
--- a/lld/docs/Readers.rst
+++ b/lld/docs/Readers.rst
@@ -52,10 +52,9 @@ Where to start
--------------
The lld project already has a skeleton of source code for Readers for
-``ELF``, ``PECOFF``, ``MachO``, and lld's native Atom graph format
-(both binary ``Native`` and ``YAML`` representations). If your file format
-is a variant of one of those, you should modify the existing Reader to
-support your variant. This is done by customizing the Options
+``ELF``, ``PECOFF``, ``MachO``, and lld's native ``YAML`` graph format.
+If your file format is a variant of one of those, you should modify the
+existing Reader to support your variant. This is done by customizing the Options
class for the Reader and making appropriate changes to the ``.cpp`` file to
interpret those options and act accordingly.
diff --git a/lld/docs/design.rst b/lld/docs/design.rst
index 9966def77ef..408b8acaf89 100644
--- a/lld/docs/design.rst
+++ b/lld/docs/design.rst
@@ -300,60 +300,13 @@ and the ivars programmatically set.
lld::File representations
-------------------------
-Just as LLVM has three representations of its IR model, lld has three
+Just as LLVM has three representations of its IR model, lld has two
representations of its File/Atom/Reference model:
* In memory, abstract C++ classes (lld::Atom, lld::Reference, and lld::File).
* textual (in YAML)
- * binary format ("native")
-
-Binary File Format
-~~~~~~~~~~~~~~~~~~
-
-In theory, lld::File objects could be written to disk in an existing Object File
-format standard (e.g. ELF). Instead we choose to define a new binary file
-format. There are two main reasons for this: fidelity and performance. In order
-for lld to work as a linker on all platforms, its internal model must be rich
-enough to model all CPU and OS linking features. But if we choose an existing
-Object File format as the lld binary format, that means an on going need to
-retrofit each platform specific feature needed from alternate platforms into the
-existing Object File format. Having our own "native" binary format side steps
-that issue. We still need to be able to binary encode all the features, but
-once the in-memory model can represent the feature, it is straight forward to
-binary encode it.
-
-The reason to use a binary file format at all, instead of a textual file format,
-is speed. You want the binary format to be as fast as possible to read into the
-in-memory model. Given that we control the in-memory model and the binary
-format, the obvious way to make reading super fast it to make the file format be
-basically just an array of atoms. The reader just mmaps in the file and looks
-at the header to see how many atoms there are and instantiate that many atom
-objects with the atom attribute information coming from that array. The trick
-is designing this in a way that can be extended as the Atom mode evolves and new
-attributes are added.
-
-The native object file format starts with a header that lists how many "chunks"
-are in the file. A chunk is an array of "ivar data". The native file reader
-instantiates an array of Atom objects (with one large malloc call). Each atom
-contains just a pointer to its vtable and a pointer to its ivar data. All
-methods on lld::Atom are virtual, so all the method implementations return
-values based on the ivar data to which it has a pointer. If a new linking
-features is added which requires a change to the lld::Atom model, a new native
-reader class (e.g. version 2) is defined which knows how to read the new feature
-information from the new ivar data. The old reader class (e.g. version 1) is
-updated to do its best to model (the lack of the new feature) given the old ivar
-data in existing native object files.
-
-With this model for the native file format, files can be read and turned
-into the in-memory graph of lld::Atoms with just a few memory allocations.
-And the format can easily adapt over time to new features.
-
-The binary file format follows the ReaderWriter patterns used in lld. The lld
-library comes with the classes: ReaderNative and WriterNative. So, switching
-between file formats is as easy as switching which Reader subclass is used.
-
Textual representations in YAML
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/lld/docs/index.rst b/lld/docs/index.rst
index 7a87ad8d058..f15e5c5ff4f 100644
--- a/lld/docs/index.rst
+++ b/lld/docs/index.rst
@@ -26,8 +26,6 @@ lld is a new set of modular code for creating linker tools.
* Extensive unit tests
* Internal linker model can be dumped/read to textual format
- * Internal linker model can be dumped/read to a new native format
- * Native format designed to be fast to read and write
* Additional linking features can be plugged in as "passes"
* OS specific and CPU specific code factored out
OpenPOWER on IntegriCloud