Commit Graph

765 Commits

Author SHA1 Message Date
Michael J. Spencer d0d5ec4a38 Convert the YAMLReader to use LLVM/Support/YAMLParser.
llvm-svn: 155847
2012-04-30 21:20:13 +00:00
Nick Kledzik 20e652d627 Add way to represent static archives in yaml test cases.
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
2012-04-20 01:24:37 +00:00
Nick Kledzik bb963dfb7e Factor out core linking options from Platform in a new ResolverOptions
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
2012-04-18 21:55:06 +00:00
Nick Kledzik b334be1ed2 First implementation of Darwin Platform. It is rich enough to generate
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
2012-04-07 01:31:00 +00:00
Nick Kledzik f4e2c73fa7 Add Pass to instantiate GOT entries
llvm-svn: 152874
2012-03-15 23:36:24 +00:00
Michael J. Spencer e753cbc685 Fix MSVC incompatibilities.
llvm-svn: 152389
2012-03-09 05:27:43 +00:00
Nick Kledzik 1a6615dc88 Sources now require C++11 to build.
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
2012-03-08 00:18:30 +00:00
Nick Kledzik 6bc04c6904 Add support for SharedLibraryAtoms (proxy atoms for exported symbols from a
shared library) and AbsoluteAtoms (proxy atoms for absolute address (e.g. ROM)).
Redesign weak importing as can-be-null-at-runtime and can-be-null-at-build-time.
Add lots of test cases for all the above.

llvm-svn: 151204
2012-02-22 21:56:59 +00:00
Nick Kledzik 49d6cc8457 (no commit message)
llvm-svn: 150539
2012-02-15 00:38:09 +00:00
Nick Kledzik 23384e84af Add support for UndefinedAtom in yaml and native format. Add test cases with undefined atoms
llvm-svn: 149962
2012-02-07 02:59:54 +00:00
Nick Kledzik f4fb2c5ac8 A couple of big refactorings: 1) Move most attributes of Atom down to DefinedAtom, so only atoms representing definitions need to implement them. 2) Remove definitionTentative, definitionWeak, mergeDuplicates, and autoHide. Replace with merge and interposable attributes. 3) Make all methods on Atom be virtual so that future object file readers can lazily generated attributes
llvm-svn: 147903
2012-01-11 01:06:19 +00:00
Nick Kledzik bfedfc171d add initial support for coalescing by content (c-strings) with test case
llvm-svn: 147799
2012-01-09 20:18:15 +00:00
Nick Kledzik 7735a7d1a0 Support more Atom attributes. Add more test cases to lld-core
llvm-svn: 147571
2012-01-04 23:58:17 +00:00
Nick Kledzik 38eec3d931 Add more merging/coalescing test cases and make core linking work for them
llvm-svn: 147130
2011-12-22 02:38:01 +00:00
Michael J. Spencer 773a8fb6ab Initial commit. Code by Nick Kledzik. Cleanups and build system by me.
llvm-svn: 146844
2011-12-18 08:27:59 +00:00