Linking of shared libraries for MIPS little-endian 32-bit target.

The following are the most significant peculiarities of MIPS target:
- MIPS ABI requires some special tags in the dynamic table.
- GOT consists of two parts local and global. The local part contains
  entries refer locally visible symbols. The global part contains entries
  refer global symbols.
- Entries in the .dynsym section which have corresponded entries in the
  GOT should be:
  * Emitted at the end of .dynsym section
  * Sorted accordingly to theirs GOT counterparts
- There are "paired" relocations. One or more R_MIPS_HI16 and R_MIPS_GOT16
  relocations should be followed by R_MIPS_LO16 relocation. To calculate
  result of R_MIPS_HI16 and R_MIPS_GOT16 relocations we need to combine
  addends from these relocations and paired R_MIPS_LO16 relocation.

The patch reviewed by Michael Spencer, Shankar Easwaran, Rui Ueyama.
http://llvm-reviews.chandlerc.com/D2156

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@197342 91177308-0d34-0410-b5e6-96231b3b80d8
[Mips] Explicitly cast ulittle32_t to the uint32_t to fix Visual Studio
compile error.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@197344 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF] Make it possible to specify export ordinals.

You can specify exported function's ordinal by /export:func,@<number> command
line option, but LLD ignored the option until now. This patch implements the
feature.

Ordinal is basically the index into the exported function address table. So,
for example, if /export:foo,@42 is specified, the linker writes foo's address
to 42th entry in the address table. Windows supports import-by-ordinal; you
can not only import a function by name, but by its ordinal. If you want to
allow your DLL users to import your functions by their ordinals, you need to
make sure that your functions are always exported with the same ordinals.
This is the feature for that situation.

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