[Mips] Move got16.test assembler source code to the test file and use
llvm-mc for an object file generation.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@199231 91177308-0d34-0410-b5e6-96231b3b80d8
[Mips] Add test case to check R_MIPS_HI16 / R_MIPS_LO16 relocations
agains _gp_disp symbol.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@199232 91177308-0d34-0410-b5e6-96231b3b80d8
[ELF] Fix type of the DefaultLayout::segments() return value. This
method returns the DefaultLayout::_segments field. The type of this field is
a vector of Segment<ELFT>* pointers. This type cannot be implicitly casted to
the range<ChunkIter>.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@199233 91177308-0d34-0410-b5e6-96231b3b80d8
[Mips] Set default base address for MIPS executables to 0x400000. Assign
the lowest segment address to the MIPS_BASE_ADDRESS dynamic tag.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@199234 91177308-0d34-0410-b5e6-96231b3b80d8
[Mips] Set default executable entry symbol name for MIPS targets. On
MIPS the entry symbol name is '__start' instead of '_start'.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@199235 91177308-0d34-0410-b5e6-96231b3b80d8
[Mips] Factor out constant represents gp value offset to the
MipsTargetLayout class method.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@199236 91177308-0d34-0410-b5e6-96231b3b80d8
[Mips] Do not store a pointer to the AtomLayout related to the
_GLOBAL_OFFSET_TABLE_ symbol. We do not use this ponter anywhere after
assigning of virtual address.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@199237 91177308-0d34-0410-b5e6-96231b3b80d8
[Mips] Check initialization of _gp_disp and _GLOBAL_OFFSET_TABLE_
symbols in case of executable file linking.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@199238 91177308-0d34-0410-b5e6-96231b3b80d8
[Mips] Create and initialize _gp symbol.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@199239 91177308-0d34-0410-b5e6-96231b3b80d8
[Mips] Calculate gp value only once.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@199240 91177308-0d34-0410-b5e6-96231b3b80d8
[Mips] Do not forget to initialize a class field.

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