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

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 16:18:02 PDT 2015


On Tue, Oct 6, 2015 at 11:23 AM, Rafael EspĂ­ndola
<rafael.espindola at gmail.com> wrote:
>> +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


r249634. This should cover the two untested relocations.

Thanks,

-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare


More information about the llvm-commits mailing list