[PATCH] D26133: [ELF] Allow relative relocations to absolute symbols in PIC

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 07:52:58 PST 2016


Petr Hosek via Phabricator <reviews at reviews.llvm.org> writes:
>    bool AbsVal = isAbsoluteValue<ELFT>(Body);
>    bool RelE = isRelExpr(E);
> -  if (AbsVal && !RelE)
> -    return true;
> -  if (!AbsVal && RelE)
> +  if (AbsVal || RelE)
>      return true;

This still looks wrong.

If the value is absolute and we have a relative relocation we will need
the dynamic linker to compute it.

If we need the dynamic linker to compute something,
isStaticLinkTimeConstant should be false.

Cheers,
Rafael


More information about the llvm-commits mailing list