[ELF][MIPS] Ignore incorrect version definition index for _gp_disp symbol
authorSimon Atanasyan <simon@atanasyan.com>
Wed, 7 Feb 2018 10:02:49 +0000 (10:02 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Wed, 7 Feb 2018 10:02:49 +0000 (10:02 +0000)
commit85815a31491561ba1ac9042c55d5312d2c98eb56
tree9227292bffec59738645ff5f28e85fe93b75d8b0
parent10003e31f47cb8a542e3d13b0fb5f56902e38854
[ELF][MIPS] Ignore incorrect version definition index for _gp_disp symbol

MIPS BFD linker puts _gp_disp symbol into DSO files and assigns zero
version definition index to it. This value means 'unversioned local
symbol' while _gp_disp is a section global symbol. We have to handle
this bug in the LLD because BFD linker is used for building MIPS
toolchain libraries.

Differential revision: https://reviews.llvm.org/D42486

llvm-svn: 324467
lld/ELF/InputFiles.cpp
lld/test/ELF/Inputs/mips-gp-dips-corrupt-ver.s [new file with mode: 0644]
lld/test/ELF/Inputs/mips-gp-dips-corrupt-ver.so [new file with mode: 0755]
lld/test/ELF/mips-gp-disp-ver.s [new file with mode: 0644]