Index: ELF/InputSection.cpp =================================================================== --- ELF/InputSection.cpp +++ ELF/InputSection.cpp @@ -625,7 +625,7 @@ case R_NEG_TLS: return Out::TlsPhdr->p_memsz - Sym.getVA(A); case R_SIZE: - return A; // Sym.getSize was already folded into the addend. + return Sym.getSize() + A; case R_TLSDESC: return InX::Got->getGlobalDynAddr(Sym) + A; case R_TLSDESC_PAGE: Index: ELF/Relocations.cpp =================================================================== --- ELF/Relocations.cpp +++ ELF/Relocations.cpp @@ -1022,10 +1022,6 @@ continue; } - // The size is not going to change, so we fold it in here. - if (Expr == R_SIZE) - Addend += Sym.getSize(); - // If the produced value is a constant, we just remember to write it // when outputting this section. We also have to do it if the format // uses Elf_Rel, since in that case the written value is the addend.