[lld][LinkingContext] Atoms created from command line options should be available in YAML

This adds an API to the LinkingContext for flavors to add Internal files
containing atoms that need to appear in the YAML output as well, when -emit-yaml
switch is used.

Flavors can add more internal files for other options that are needed.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@189718 91177308-0d34-0410-b5e6-96231b3b80d8
[lld][ELF] Add Init/Fini support

This creates .init_array/.fini_array section for X86_64 ELF
targets and executes init/fini functions specified by the
-init/-fini options respectively.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@189719 91177308-0d34-0410-b5e6-96231b3b80d8
[lld][test] organize test directory. No change in functionality

* Renames few tests which had extension objtxt to test
* created core directory that contains all the core tests

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@189720 91177308-0d34-0410-b5e6-96231b3b80d8
ReaderWriter depends on Passes.


git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@189751 91177308-0d34-0410-b5e6-96231b3b80d8
Recognize -Bshareable as alias for -shared.


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


git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@189771 91177308-0d34-0410-b5e6-96231b3b80d8
Add llc to check-lld deps. We use the command in lit.cfg.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@189774 91177308-0d34-0410-b5e6-96231b3b80d8
Resolver: Do not use assert() to notify user input error.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@189775 91177308-0d34-0410-b5e6-96231b3b80d8
Partially revert r189718 to add entry symbol to dead strip root.

Also added a test to verify that entry symbol is not stripped even if
dead stripping is enabled.

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

Differential Revision: http://llvm-reviews.chandlerc.com/D1577

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@189777 91177308-0d34-0410-b5e6-96231b3b80d8
Do not add entry symbol to the dead strip list. Partially revert r189776.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@189778 91177308-0d34-0410-b5e6-96231b3b80d8
A weak reference to a symbol that is only weakly referenced in
dependencies should remain weak, not get promoted to undef or dropped.


git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@189793 91177308-0d34-0410-b5e6-96231b3b80d8
Add support for --sysroot.


git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@189826 91177308-0d34-0410-b5e6-96231b3b80d8
Finish -rpath implementation to actually create the DT_RPATH entries.


git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@189847 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF] Fix fixme by making PECOFFLinkingContext non-const.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@189865 91177308-0d34-0410-b5e6-96231b3b80d8
[lld] handle the case of errors from createLinkerInput

This changes the interface of createLinkerInput to use ErrorOr, so that
errors from the linker can be captured.

Also adds a convenience function for error strings to be returned from
file nodes.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@189871 91177308-0d34-0410-b5e6-96231b3b80d8
[lld][ELF][Hexagon] add Init/Fini option for hexagon

This adds init/fini support for Hexagon.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@189872 91177308-0d34-0410-b5e6-96231b3b80d8
[lld][ELF] Change the InitFini atom type from Stub to Data

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@189873 91177308-0d34-0410-b5e6-96231b3b80d8
[lld][ELF][X86_64] Fix alignment of init_array/fini_array sections

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@189874 91177308-0d34-0410-b5e6-96231b3b80d8
[lld][ELF][X86_64] Test alignment for init_array/fini_array sections

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