[MachO] Remove "virtual" and add "override".

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@205057 91177308-0d34-0410-b5e6-96231b3b80d8
Check in binaries to avoid dependency on broken llvm-mc behavior.

On these tests llvm-mc will convert got relocations with a symbol to section
relocations. This is invalid, since the relocation doesn't reference the symbol
itself, so its offset in a section in irrelevant.

Given the object files, these are still valid lld tests, so just run the
tests directly on the binaries.

Found by running check-lld after fixing the relocation handling in llvm-mc.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@205077 91177308-0d34-0410-b5e6-96231b3b80d8
Forgot to replace a %t1 in the previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@205078 91177308-0d34-0410-b5e6-96231b3b80d8
[core] support .gnu.linkonce sections

.gnu.linkonce sections are similar to section groups. They were supported before
section groups existed and provided a way to resolve COMDAT sections using a
different design. There are few implementations that use .gnu.linkonce sections
to store simple floating point constants which doesnot require complex section
group support but need a way to store only one copy of the floating point
constant. .gnu.linkonce based symbol resolution achieves that.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@205163 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "[core] support .gnu.linkonce sections"

This reverts commit 5d5ca72a7876c3dd3dd1db83dc6a0d74be9e2cd1.

Discuss on a better design to raise error when there is a similar group with Gnu
linkonce sections and COMDAT sections.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@205224 91177308-0d34-0410-b5e6-96231b3b80d8
Check-in binary to isolate the lld test form a changing llvm-mc.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@205238 91177308-0d34-0410-b5e6-96231b3b80d8
[core] support .gnu.linkonce sections

.gnu.linkonce sections are similar to section groups.

They were supported before section groups existed and provided a way
to resolve COMDAT sections using a different design.

There are few implementations that use .gnu.linkonce sections
to store simple floating point constants which doesnot require complex section
group support but need a way to store only one copy of the floating point
constant in a binary.

.gnu.linkonce based symbol resolution achieves that.

Review : http://llvm-reviews.chandlerc.com/D3242

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@205280 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF] Treat .imp as an import library file.

Some Clang build uses .imp not .lib file extension for an import library file,
so we need to treat such file as a library file.

Ideally we should not rely on file extensions to detect file type. Instead
we should use magic bytes at beginning of a file. The GNU-compatible driver
actually does that but it made writing unit tests hard, so I chose an ad-hoc
approach for now.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@205283 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF] Make PECOFFFileNode::parse idempotent.

PECOFFFileNode::parse can be called twice -- once by WinLink driver and
once more by Driver. We want to make sure that the second call won't mess
up the internal data.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@205284 91177308-0d34-0410-b5e6-96231b3b80d8
s/dyn_cast/cast/ where return value should never be null.

cast<X> asserts the type is correct and does not return null on failure.
So we should use cast<X> rather than dyn_cast<X> at such places where we
don't expect type conversion could fail.

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

Asserting with cast<T> did not actually make much sense because there was no
need to use dynamic casting in the first place. We could make the compiler to
statically type check these objects.

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