[lld][LayoutPass] initialize the number of entries for the densehash (no functionality change)

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@180690 91177308-0d34-0410-b5e6-96231b3b80d8
[lld][ELF] (no testable functionality change) resize the number of entries in the string table for static linking

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@180691 91177308-0d34-0410-b5e6-96231b3b80d8
[lld][ELF] (no testable functionality change) resize the number of entries in the string table for static linking

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@180692 91177308-0d34-0410-b5e6-96231b3b80d8
[lld][ELF] continue on finding a section with no symbols, tests already present

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@180769 91177308-0d34-0410-b5e6-96231b3b80d8
[lld][ELF] reduce the number of symbols emitted in the symbol table

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@180872 91177308-0d34-0410-b5e6-96231b3b80d8
[lld][ELF] fix header comment typos

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@181188 91177308-0d34-0410-b5e6-96231b3b80d8
[lld]remove lld-core

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@181244 91177308-0d34-0410-b5e6-96231b3b80d8
[Core] Properly stop the ThreadPoolExecutor and use the ConcRT memory allocator.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@181279 91177308-0d34-0410-b5e6-96231b3b80d8
[ELF] Initialize readers and writers on creation.

This makes the target handler a constructor argument because the constructor of
OutputELFWriter relies on it being initialized.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@181280 91177308-0d34-0410-b5e6-96231b3b80d8
[lld][ELF] split ELF reader into multiple functions for readability (no change in functionality)

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@181288 91177308-0d34-0410-b5e6-96231b3b80d8
[lld][ELF] fix build failure

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@181325 91177308-0d34-0410-b5e6-96231b3b80d8
Use anonymous namespace for local classes.  Patch by Rui Ueyama

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@181473 91177308-0d34-0410-b5e6-96231b3b80d8
[lld] Add "explicit" to constructors where appropriate.

Summary:
Add the explicit keyword to one-parameter
constructors to prevent unintended type conversions.

CC: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@181483 91177308-0d34-0410-b5e6-96231b3b80d8
[lld][Core] Fix latch synchronization bug.

We need to acquire a lock before signal a condition.
Otherwise threads waiting on a condition variable can
miss a signal.

Consider two threads: Thread A executing dec() and thread
B executing sync(). The initial value of _count is 1. If
these two threads are interleaved in the following order,
thread B misses the signal sent by thread A, because at the
time thread A sends a signal, B is not waiting for it.

  Thread A                 |   Thread B
                           |   std::unique_lock<std::mutex> lock(_condMut);
                           |   while (!(_count == 0)) {
  if (--_count == 0)       |
    _cond_notify_all()     |
                           |     _cond.wait();
                           |   }

Note that "wait(lock, pred)" is equivalent to "while(!pred())
wait(lock)", so I expanded it in the above example.

Reviewers: Bigcheese

CC: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@181484 91177308-0d34-0410-b5e6-96231b3b80d8
[lld] Add comments to InputFiles::searchLibraries() arguments.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@181492 91177308-0d34-0410-b5e6-96231b3b80d8
[lld] Use range based for loop instead of explicit iterators (no functionality change)

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@181503 91177308-0d34-0410-b5e6-96231b3b80d8
[lld] Fix wrong comment.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@181547 91177308-0d34-0410-b5e6-96231b3b80d8
[lld] Fix broken test. -layout-pass option does not exist.

Also shuffle the atoms so that it can verify the layout pass
actually changed the layout.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@181573 91177308-0d34-0410-b5e6-96231b3b80d8
[lld][LayoutPass] This commit fixes a problem in the
Layoutpass by ordering atoms if they appear in the override
list first and then looking at the way of ordering atoms in
the default way.

The fix also fixes issues with the sizes of the sections,
that appear in the output properly too.

The commit also adds a testcase(orderatoms-by-override.test)
to test it and fixes all the other relevant testcases.


git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@181605 91177308-0d34-0410-b5e6-96231b3b80d8
[lld][ELF] set ordinals for mergeAtoms and fix testcase

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