[PATCH] D33975: [MachO] Fix codegen of alias of alias.
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 7 20:11:56 PDT 2017
Evgenii Stepanov <eugenis at google.com> writes:
> On Wed, Jun 7, 2017 at 3:39 PM, Rafael Avila de Espindola
> <rafael.espindola at gmail.com> wrote:
>> Evgenii Stepanov via Phabricator <reviews at reviews.llvm.org> writes:
>>
>>> Index: test/MC/MachO/alias.s
>>> ===================================================================
>>> --- /dev/null
>>> +++ test/MC/MachO/alias.s
>>> @@ -0,0 +1,12 @@
>>> +// RUN: llvm-mc -triple x86_64-apple-macosx10.12.0 %s -filetype=obj | llvm-readobj -r | FileCheck %s
>>> +
>>> +l_a:
>>> +l_b = l_a
>>> +l_c = l_b
>>> + .long l_c
>>> +
>>> +// CHECK: Relocations [
>>> +// CHECK-NEXT: Section __text {
>>> +// CHECK-NEXT: 0x0 0 2 1 X86_64_RELOC_UNSIGNED 0 l_c
>>> +// CHECK-NEXT: }
>>> +// CHECK-NEXT: ]
>>
>> Wasn't the expectation that the relocation was with l_a?
>
> Well, they are the same.
> This code is used to evaluate the value of the fixup in the current
> layout, which is later ignored, AFAIU, because the fixup is not fully
> resolved, and we end up recording the original fixup expression, i.e.
> l_c.
I thought the patch would make it fully resolved. In any case, LGTM.
Cheers,
Rafael
More information about the llvm-commits
mailing list