[lld] r257119 - ELF: Simplify Target::isSizeReloc and add comments.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 18 10:31:04 PST 2016


> +    } else if (Target->isSizeReloc(Type) && canBePreempted(Body, false)) {
> +      // A SIZE relocation is supposed to set a symbol size, but if a symbol
> +      // can be preempted, the size at runtime may be different than link time.
> +      // If that's the case, we leave the field alone rather than filling it
> +      // with a possibly incorrect value.

It is not so much that we "leave the field alone", it is that we pass
the relocation forward to the dynamic linker.

Thanks for all the comments.

Cheers,
Rafael


More information about the llvm-commits mailing list