Index: ELF/Relocations.cpp =================================================================== --- ELF/Relocations.cpp +++ ELF/Relocations.cpp @@ -351,6 +351,8 @@ // between start of a function and '_gp' value and defined as absolute just // to simplify the code. if (AbsVal && RelE) { + if (Body.isLocal() || Body.getVisibility() == STV_HIDDEN) + return true; if (Body.isUndefined() && !Body.isLocal() && Body.symbol()->isWeak()) return true; if (&Body == ElfSym::MipsGpDisp)