This patch inverts the return value of these functions, so that they return
"true" on success and "false" on failure. The meaning of boolean return value
was mixed in LLD; for example, InputGraph::validate() returns true on success.
With this patch they'll become consistent.
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1748
llvm-svn: 191341
The major changes are:
1) LinkerOptions has been merged into TargetInfo
2) LinkerInvocation has been merged into Driver
3) Drivers no longer convert arguments into an intermediate (core) argument
list, but instead create a TargetInfo object and call setter methods on
it. This is only how in-process linking would work. That is, you can
programmatically set up a TargetInfo object which controls the linking.
4) Lots of tweaks to test suite to work with driver changes
5) Add the DarwinDriver
6) I heavily doxygen commented TargetInfo.h
Things to do after this patch is committed:
a) Consider renaming TargetInfo, given its new roll.
b) Consider pulling the list of input files out of TargetInfo. This will
enable in-process clients to create one TargetInfo the re-use it with
different input file lists.
c) Work out a way for Drivers to format the warnings and error done in
core linking.
llvm-svn: 178776
This removes Target and moves the functionality it had over to TargetInfo.
This also simplifies LinkerInput by removing the InputKind. This will be handled elsewhere.
llvm-svn: 174589
I really would have liked to split this patch up, but it would greatly
complicate the lld-core and lld drivers having to deal with both
{Reader,Writer}Option and TargetInfo.
llvm-svn: 173217
There is no way to test this at the moment because the options are not
processed until the link starts, and we can't pass an empty file.
llvm-svn: 171910
This includes selecting which driver to emulate, option parsing, invocation
building, and running the link. This currently only supports a very basic
subset of ld for x86_64-linux.
lld -flavor ld obj.o -o obj
or symlink lld as (ld , link, ld64, core) to get the desired behavior without
-flavor.
llvm-svn: 169659
- Hexagon has many relocation types, this patch covers just
a subset, more will be added.
- PowerPC support was added so that we can verify mixed endian
environments.
* Add some basic test cases
* Update ldd-core to accept -endian flag
llvm-svn: 165477
* Updates ReaderELF.cpp contentType method to match ELF.h's logic and now handle
typeData
* Add -arch to ldd-core testdriver
* Add testcase to check typeData
* Update others to stay in sync with this change.
llvm-svn: 164976
table header. Skeleton code for ReferenceKinds.
Credits:
Doxygen by Michael Spencer.
Origianl implementation from Macho by Sidney Manning.
Templatization, implementation of section header chunks, string table, ELF header by Hemant Kulkarni.
llvm-svn: 163906
now Reader and Writer subclasses for each file format. Each Reader and
Writer subclass defines an "options" class which controls how that Reader
or Writer operates.
llvm-svn: 157774
Add SharedLibraryFile and ArchiveLibraryFile subclasses of File.
Add command line options to lld-core to set various ResolverOptions settings
and added lots of test cases to verify the options work.
llvm-svn: 155183
class. Change Resolver to no longer use Platform. Core linking
now issues errors directly. We need to factor that out later.
Rework how Darwin executable writer finds "main" atom. It now
adds to core linking an Atom which has a Reference to "main".
llvm-svn: 155060
a hello world executable from atoms. There is still much to be flushed out.
Added one test case, test/darwin/hello-world.objtxt, which exercises the
darwin platform.
Added -platform option to lld-core tool to dynamically select platform.
llvm-svn: 154242
Add first linker pass (StubsPass) which looks for calls to shared library
symbols and replaces them with calls to a StubAtom. On ELF system, a "stub"
is a PLT entry. Added a simple test case.
Pass a Platform object to YAML reader and writer for converting fixup kinds
between names and values.
Change output of Resolver to be a File object instead of a vector of Atoms.
Thus, passes operate on a File instead of just Atoms.
Rework how to walk through a File's Atoms. Now iterator based instead of
a method that visits each atom.
llvm-svn: 152269