[ELF][MIPS] Add handling for __gnu_local_gp symbol
This symbol is a "fake" symbol like "_gp_disp" and denotes
the GOT + 0x7FF0 value.
llvm-svn: 259781
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index e4fb84f..c184d75 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -388,7 +388,7 @@
// relocation too because that case is possible for executable file
// linking only.
continue;
- if (Body == Config->MipsGpDisp)
+ if (Body == Config->MipsGpDisp || Body == Config->MipsLocalGp)
// MIPS _gp_disp designates offset between start of function and gp
// pointer into GOT therefore any relocations against it do not require
// dynamic relocation.