[lld][ELF] Handle multiple weak symbols

This handles multiple weak symbols which appear back to back. This fix is needed
which otherwise will lead to symbols getting initialized to arbitrary values.

There was a constructor/destructor test that really triggered this to be fixed
on X86_64.

Adds a test.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@190658 91177308-0d34-0410-b5e6-96231b3b80d8
Add test case for the not-yet implemented copy relocations.


git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@190714 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF] Fix atom default alignment.

Alignment(1) does not mean that the atom should be aligned on a 1 byte
boundary but on a 2^1 boundary. So, atoms without any specific alignment
requirements should have Alignment(0).

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

There was a bug that if a section has an alignment requirement and there are
multiple symbols at offset 0 in the section, only the last atom at offset 0
would be aligned properly. That bug would move only the last symbol to an
alignment boundary, leaving other symbols unaligned, although they should be at
the same location. That caused a mysterious SEGV error of the resultant
executable.

With this patch, we manage all symbols at the same location properly, rather
than keeping the last one.

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