[PATCH] D35791: [COFF, ARM64] Fix symbol offsets in ADRP/ADD/LDR/STR relocations

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 25 03:50:22 PDT 2017


On Mon, 24 Jul 2017, Rafael Avila de Espindola wrote:

> Martin Storsjö via Phabricator <reviews at reviews.llvm.org> writes:
>>    case AArch64::fixup_aarch64_pcrel_adrp_imm21:
>> +    if (TheTriple.isOSBinFormatCOFF() && !IsResolved)
>> +      return AdrImmBits(Value & 0x1fffffULL);
>
> If IsResolved should always be false, plase assert.

Ok, will add an assert here.

>>    case AArch64::fixup_aarch64_add_imm12:
>>    case AArch64::fixup_aarch64_ldst_imm12_scale1:
>> +    if (TheTriple.isOSBinFormatCOFF())
>> +      Value &= 0xfff;
>
> What about all the other cases? Do you also expect IsResolved to always
> be false?

No, here we clearly need a check for !IsResolved - thanks for pointing it 
out.

Will update the patch accordingly.

// Martin


More information about the llvm-commits mailing list