[ELF][MIPS] Calculate combined addend for R_MIPS_GOT16 against local symbol
authorSimon Atanasyan <simon@atanasyan.com>
Thu, 25 Feb 2016 21:33:56 +0000 (21:33 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Thu, 25 Feb 2016 21:33:56 +0000 (21:33 +0000)
commit860fbf094eb2b7c750bdce76599c16ba13ebc4f5
treeb4e4961a0d861e7379b51e269d60b81f55d2bf73
parentad9f53e959b7620a02df8a3287c5862d7b5b71f2
[ELF][MIPS] Calculate combined addend for R_MIPS_GOT16 against local symbol

R_MIPS_GOT16 relocation against local symbol requires index of a local
GOT entry which contains page address corresponds to sum of the symbol
address and addend. The addend in that case is calculated using addends
from the R_MIPS_GOT16 and paired R_MIPS_LO16 relocations.

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

llvm-svn: 261930
lld/ELF/InputSection.cpp
lld/test/ELF/mips-got16.s