[llvm] r269436 - [RuntimeDyld] Support R_390_PC64 relocation type

Bryan Chan via llvm-commits llvm-commits at lists.llvm.org
Fri May 13 14:05:51 PDT 2016


Hi Steven,

Thanks for fixing it quickly. In the future I will check if a lit config is
needed.

Bryan





From:	Steven Wu <stevenwu at apple.com>
To:	Bryan Chan/Toronto/IBM at IBMCA
Cc:	llvm-commits at lists.llvm.org
Date:	2016-05-13 04:17 PM
Subject:	Re: [llvm] r269436 - [RuntimeDyld] Support R_390_PC64
            relocation type
Sent by:	stevenwu at apple.com



Should be fixed in r269470. Disable the test if the backend is not built.

Steven

> On May 13, 2016, at 12:17 PM, Steven Wu <stevenwu at apple.com> wrote:
>
> Hi Bryan
>
> The test is failing on Darwin bots:
http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/18126/testReport/junit/LLVM/ExecutionEngine_RuntimeDyld_SystemZ/cfi_relo_pc64_s/

> Can you take a look?
>
> Thanks
>
> Steven
>
>> On May 13, 2016, at 10:23 AM, Bryan Chan via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
>>
>> Author: bryanpkc
>> Date: Fri May 13 12:23:48 2016
>> New Revision: 269436
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=269436&view=rev
>> Log:
>> [RuntimeDyld] Support R_390_PC64 relocation type
>>
>> Summary: When the MCJIT generates ELF code, some DWARF data requires
64-bit PC-relative relocation (R_390_PC64). This patch adds support for
R_390_PC64 relocation to RuntimeDyld::resolveSystemZRelocation, to avoid an
assertion failure.
>>
>> Reviewers: uweigand
>>
>> Subscribers: llvm-commits
>>
>> Differential Revision: http://reviews.llvm.org/D20033
>>
>> Added:
>>   llvm/trunk/test/ExecutionEngine/RuntimeDyld/SystemZ/
>>   llvm/trunk/test/ExecutionEngine/RuntimeDyld/SystemZ/Inputs/
>>
llvm/trunk/test/ExecutionEngine/RuntimeDyld/SystemZ/Inputs/rtdyld-globals.ll

>>   llvm/trunk/test/ExecutionEngine/RuntimeDyld/SystemZ/cfi-relo-pc64.s
>> Modified:
>>   llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
>>
>> Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
>> URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp?rev=269436&r1=269435&r2=269436&view=diff

>>
==============================================================================

>> --- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
(original)
>> +++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp Fri
May 13 12:23:48 2016
>> @@ -1066,6 +1066,11 @@ void RuntimeDyldELF::resolveSystemZReloc
>>  case ELF::R_390_64:
>>    writeInt64BE(LocalAddress, Value + Addend);
>>    break;
>> +  case ELF::R_390_PC64: {
>> +    int64_t Delta = (Value + Addend) - Section.getLoadAddressWithOffset
(Offset);
>> +    writeInt64BE(LocalAddress, Delta);
>> +    break;
>> +  }
>>  }
>> }
>>
>>
>> Added:
llvm/trunk/test/ExecutionEngine/RuntimeDyld/SystemZ/Inputs/rtdyld-globals.ll

>> URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/RuntimeDyld/SystemZ/Inputs/rtdyld-globals.ll?rev=269436&view=auto

>>
==============================================================================

>> ---
llvm/trunk/test/ExecutionEngine/RuntimeDyld/SystemZ/Inputs/rtdyld-globals.ll
 (added)
>> +++
llvm/trunk/test/ExecutionEngine/RuntimeDyld/SystemZ/Inputs/rtdyld-globals.ll
 Fri May 13 12:23:48 2016
>> @@ -0,0 +1 @@
>> + at foo = global i8 0
>>
>> Added:
llvm/trunk/test/ExecutionEngine/RuntimeDyld/SystemZ/cfi-relo-pc64.s
>> URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/RuntimeDyld/SystemZ/cfi-relo-pc64.s?rev=269436&view=auto

>>
==============================================================================

>> --- llvm/trunk/test/ExecutionEngine/RuntimeDyld/SystemZ/cfi-relo-pc64.s
(added)
>> +++ llvm/trunk/test/ExecutionEngine/RuntimeDyld/SystemZ/cfi-relo-pc64.s
Fri May 13 12:23:48 2016
>> @@ -0,0 +1,32 @@
>> +// Test that R_390_PC32 and R_390_PC64 relocations can be generated.
>> +// RUN: llvm-mc -triple s390x-linux-gnu -relocation-model=pic
-filetype=obj %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
>> +
>> +// Test that RuntimeDyld can fix up such relocations.
>> +// RUN: llvm-mc -triple s390x-linux-gnu -relocation-model=pic
-filetype=obj %s -o %T/test-s390x-cfi-relo-pc64.o
>> +// RUN: llc -mtriple=s390x-linux-gnu -relocation-model=pic
-filetype=obj %S/Inputs/rtdyld-globals.ll -o %T/test-s390x-rtdyld-globals.o
>> +// RUN: llvm-rtdyld -triple=s390x-linux-gnu -verify
%T/test-s390x-cfi-relo-pc64.o %T/test-s390x-rtdyld-globals.o
>> +
>> +f1:
>> +    .cfi_startproc
>> +    .cfi_personality 0x9c, foo // DW_EH_PE_indirect|DW_EH_PE_pcrel|
DW_EH_PE_sdata8 (0x9c)
>> +    lr %r0, %r0
>> +    .cfi_endproc
>> +
>> +// CHECK:        Section {
>> +// CHECK:          Index:
>> +// CHECK:          Name: .rela.eh_frame
>> +// CHECK-NEXT:     Type: SHT_RELA
>> +// CHECK-NEXT:     Flags [
>> +// CHECK-NEXT:     ]
>> +// CHECK-NEXT:     Address: 0x0
>> +// CHECK-NEXT:     Offset:
>> +// CHECK-NEXT:     Size: 48
>> +// CHECK-NEXT:     Link:
>> +// CHECK-NEXT:     Info:
>> +// CHECK-NEXT:     AddressAlignment: 8
>> +// CHECK-NEXT:     EntrySize: 24
>> +// CHECK-NEXT:     Relocations [
>> +// CHECK-NEXT:       0x12 R_390_PC64 foo 0x0
>> +// CHECK-NEXT:       0x28 R_390_PC32 .text 0x0
>> +// CHECK-NEXT:     ]
>> +// CHECK:        }
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160513/d2a8f108/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160513/d2a8f108/attachment.gif>


More information about the llvm-commits mailing list