[lld] r315673 - Make it explicit that we are writing addends to target sections if REL.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 24 08:58:18 PDT 2017


Rui Ueyama via llvm-commits <llvm-commits at lists.llvm.org> writes:

> +    // 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.
> +    if (IsConstant) {
> +      Sec.Relocations.push_back({Expr, Type, Offset, Addend, &Body});
> +      continue;
> +    }

This Elf_Rel comment is now out of sync with the code, no?

Cheers,
Rafael


More information about the llvm-commits mailing list