[ELF][MIPS] Add lazy relocation support for MIPS
authorSimon Atanasyan <simon@atanasyan.com>
Wed, 10 Feb 2016 19:57:19 +0000 (19:57 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Wed, 10 Feb 2016 19:57:19 +0000 (19:57 +0000)
commit2287dc3bf8a937330a1f35156067fda550f50bb6
tree6600b2e5b3d8b28205d1e179d94403564b739424
parentb3cce5d33a68a22b592b7d06bbf224c154aa0f11
[ELF][MIPS] Add lazy relocation support for MIPS

The patch adds lazy relocation support for MIPS and R_MIPS_26 relocation
handing.

R_MIPS_26 relocation might require PLT entry creation. In that case it
is fully supported by the patch. But if the relocation target is a local
symbol we need to use a different expression to calculate the relocation
result. This case is not implemented yet because there is no method to
get know the kind of relocation target in the `relocateOne` routine.

Differential Revision: http://reviews.llvm.org/D16982

llvm-svn: 260424
lld/ELF/Target.cpp
lld/test/ELF/Inputs/mips-dynamic.s
lld/test/ELF/mips-26.s [new file with mode: 0644]
lld/test/ELF/mips-plt-copy.s