[lld] r249195 - [ELF2/AArch64] Add support for R_AARCH64_ADR_PREL_PG_H121

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 11:23:16 PDT 2015


> +static void handle_ADR_PREL_PG_HI21(uint8_t *Location, uint64_t S, int64_t A,
> +                                    uint64_t P) {
> +  uint64_t X = AArch64GetPage(S + A) - AArch64GetPage(P);
> +  if (!isInt<33>(X))
> +    error("Relocation R_AARCH64_ADR_PREL_PG_HI21 out of range");
> +  AArch64UpdateAdr(Location, (X >> 12) & 0x1FFFFF); // X[32:12]
>  }

It should be possible to test this error with absolute symbols, no?

Cheers,
Rafael


More information about the llvm-commits mailing list