[Mips] Replace assembler code by YAML to make the 'interpreter.test' test
target independent.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@214495 91177308-0d34-0410-b5e6-96231b3b80d8
[Mips] Replace assembler code by YAML to make the 'gotsym.test' test
target independent.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@214641 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF] Remove unused paraemter.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@214791 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF] Fix /include option in .drectve section.

/INCLUDE arguments passed as command line options are handled in the
same way as Unix -u. All option values are converted to an undefined
symbol and added to a dummy input file, so that the specified symbols
are resolved.

One tricky thing on Windows is that the option is also allowed to
appear in the object file's directive section. At the time when
it's being read, all (regular) command line options have already
been processed. We cannot add undefined atoms to the dummy file
anymore.

Previously, we added such /INCLUDE to a set that has already been
processed. As a result the options were ignored.

This patch fixes the issue. Now, /INCLUDE symbols in the directive
section are handled as real undefined symbol in the COFF file.
We create an undefined symbol for each /INCLUDE argument and add
it to the file being parsed.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@214824 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF] addDeadStripRoot is not thread-safe.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@214835 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF] Exported symbols are dead-strip roots.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@214948 91177308-0d34-0410-b5e6-96231b3b80d8
Fix sphinx warning.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@214968 91177308-0d34-0410-b5e6-96231b3b80d8
Fix missing favicon.ico warning (Sphinx 1.2.2). The comments next to
``html_favicon`` seem to conflict with [what it in the sphinx
docs](http://sphinx-doc.org/config.html#confval-html_favicon).

So I've copied the comments from there to conf.py and changed its
value appropriately to remove the missing favicon.ico warning.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@214971 91177308-0d34-0410-b5e6-96231b3b80d8
Fix mach-o tests on Windows

The tests assume the path separator is '/', but if you run
them on Windows it is '\'. As a result the tests are failing
on Windows. This should be the minimal change to make these
tests to pass on Windows platform.

Differential Revision: http://reviews.llvm.org/D4710

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@214990 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF] Fix /profile option.

/profile implies /fixed:no -- so we had to *enable* base
relocations rather than disabling it.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@215389 91177308-0d34-0410-b5e6-96231b3b80d8
[mips] Remove .end and .end from test/elf/Mips/hilo16-3.test

The commit of the .ent/.end implementation will change the result of the
relocation evaluations (because of a new section and additional relocations)
which will lead to a failure if the .ent/.end directives are present in this
test.
We don't really need the .ent/.end directives in this test so let's just remove
them to preserve the current output.



git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@215534 91177308-0d34-0410-b5e6-96231b3b80d8
[AArch64] Initial ELF/AArch64 Support

This patch adds the initial ELF/AArch64 support to lld. Only a basic "Hello
World" app has been successfully tested for both dynamic and static compiling.

Differential Revision: http://reviews.llvm.org/D4778
Patch by Daniel Stewart <stewartd@codeaurora.org>!

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@215544 91177308-0d34-0410-b5e6-96231b3b80d8
Remove unused private fields from r215544 to appease buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@215547 91177308-0d34-0410-b5e6-96231b3b80d8
AArch64: replace __func__ with LLVM_FUNCTION_NAME

MSVC doesn't define __func__.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@215578 91177308-0d34-0410-b5e6-96231b3b80d8
[mach-o] set ordinal in n_desc for undefined symbols

Mach-o uses "two-level namespace" where each undefined symbols is associated
with a specific dylib. This means at runtime the loader (dyld) does need to
search all loaded dylibs for that symbol but rather just the one specified.

Now that llvm-nm -m prints out that info, properly set that info, and test
it in the hello world test cases.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@215598 91177308-0d34-0410-b5e6-96231b3b80d8
[mach-o] Fix stub generation to work for dylibs and bundles

Split up the CRuntimeFile into one part for output types that need an entry
point and another part for output types that use stubs.

Add file 'test/mach-o/Inputs/libSystem.yaml' for use by test cases that
use -dylib and therefore may now need the helper symbol in libSystem.dylib.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@215602 91177308-0d34-0410-b5e6-96231b3b80d8
[mach-o] Support re-exported dylibs

In general two-level namespace means each program records exactly which dylib
each undefined (imported) symbol comes from.  But, sometimes the implementor
wants to hide the implementation dylib.  For instance libSytem.dylib is the base
dylib all Darwin programs must link with.  A few years ago it was split up
into two dozen dylibs by all are hidden behind libSystem.dylib which re-exports
each sub-dylib.  All clients still think libSystem.dylib is the implementor.

To support this, the linker must load "indirect" dylibs and not just the
"direct" dylibs specified on the command line.  This is done in the
createImplicitFiles() method after all command line specified files are
loaded.  Since an indirect dylib may have already been loaded as a direct dylib
(or indirectly via a previous direct dylib), the MachOLinkingContext keeps
a list of all loaded dylibs.

With this change hello world can now be linked against the real OS or SDK.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@215605 91177308-0d34-0410-b5e6-96231b3b80d8
[mach-o] Support -F and -framework options in darwin driver

Darwin has a packaging mechanism for shared libraries and headers called
frameworks.  A directory Foo.framework contains a shared library binary file
"Foo" and a subdirectory "Headers". Most OS frameworks are all in one
directory /System/Library/Frameworks/.  As a linking convenience, the linker
option "-framework Foo" means search the framework directories specified
with -F (analogous to -L) looking for a shared library Foo.framework/Foo.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@215680 91177308-0d34-0410-b5e6-96231b3b80d8
[mach-o] Support -filelist option in darwin driver

The darwin linker has an option, heavily used by Xcode, in which, instead
of listing all input files on the command line, the input file paths are
written to a text file and the path of that text file is passed to the linker
with the -filelist option (similar to @file).

In order to make test cases for this, I generalized the -test_libresolution
option to become -test_file_usage.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@215762 91177308-0d34-0410-b5e6-96231b3b80d8
[mach-o] improve darwin driver 'usage' message when run with no args

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@215781 91177308-0d34-0410-b5e6-96231b3b80d8