diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp --- a/lld/ELF/Relocations.cpp +++ b/lld/ELF/Relocations.cpp @@ -404,17 +404,7 @@ if (!absVal && !relE) return target->usesOnlyLowPageBits(type); - // Relative relocation to an absolute value. This is normally unrepresentable, - // but if the relocation refers to a weak undefined symbol, we allow it to - // resolve to the image base. This is a little strange, but it allows us to - // link function calls to such symbols. Normally such a call will be guarded - // with a comparison, which will load a zero from the GOT. - // Another special case is MIPS _gp_disp symbol which represents offset - // between start of a function and '_gp' value and defined as absolute just - // to simplify the code. assert(absVal && relE); - if (sym.isUndefWeak()) - return true; // We set the final symbols values for linker script defined symbols later. // They always can be computed as a link time constant.