[lld] r299615 - Create GOT and PLT entries early in scanRelocs().

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 6 13:11:54 PDT 2017


>  static bool refersToGotEntry(RelExpr Expr) {
>    return isRelExprOneOf<R_GOT, R_GOT_OFF, R_MIPS_GOT_LOCAL_PAGE, R_MIPS_GOT_OFF,
> -                        R_MIPS_GOT_OFF32, R_MIPS_TLSGD, R_MIPS_TLSLD,
> -                        R_GOT_PAGE_PC, R_GOT_PC, R_GOT_FROM_END, R_TLSGD,
> -                        R_TLSGD_PC, R_TLSDESC, R_TLSDESC_PAGE>(Expr);
> +                        R_MIPS_GOT_OFF32, R_GOT_PAGE_PC, R_GOT_PC,
> +                        R_GOT_FROM_END>(Expr);
>  }

R_TLSGD_PC refers to a got entry. You might want to rename this function.

>      // If the relocation points to something in the file, we can process it.
> -    bool Constant =
> +    bool IsConstant =
>          isStaticLinkTimeConstant<ELFT>(Expr, Type, Body, Sec, Rel.r_offset);

In the future please do renames like these in their own patch, as it
make each patch easier to read.

Cheers,
Rafael


More information about the llvm-commits mailing list