From c5bd7e5db0e0dbe86cffb7611e2037c8cc6fe668 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Fri, 16 Feb 2018 19:10:49 +0000 Subject: Vendor import of lld release_60 branch r325330: https://llvm.org/svn/llvm-project/lld/branches/release_60@325330 --- ELF/InputFiles.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ELF/InputFiles.cpp') diff --git a/ELF/InputFiles.cpp b/ELF/InputFiles.cpp index f514870ca84a..ccf4b3d7673f 100644 --- a/ELF/InputFiles.cpp +++ b/ELF/InputFiles.cpp @@ -856,6 +856,14 @@ template void SharedFile::parseRest() { continue; } + if (Config->EMachine == EM_MIPS) { + // FIXME: MIPS BFD linker puts _gp_disp symbol into DSO files + // and incorrectly assigns VER_NDX_LOCAL to this section global + // symbol. Here is a workaround for this bug. + if (Versym && VersymIndex == VER_NDX_LOCAL && Name == "_gp_disp") + continue; + } + const Elf_Verdef *Ver = nullptr; if (VersymIndex != VER_NDX_GLOBAL) { if (VersymIndex >= Verdefs.size() || VersymIndex == VER_NDX_LOCAL) { -- cgit v1.3