Support R_ARM_REL32 and R_ARM_GOT_PREL in RuntimeDyldELF (SR-387)

Lang Hames via llvm-commits llvm-commits at
Tue Mar 22 13:05:20 PDT 2016

Hi Michael, William,

William - thank you very much for this!

If possible, could you please add an ELF test case to llvm/test/ExecutionEngine/RuntimeDyld/ARM? There is an existing MachO test case there that may be of some help, though it does not contain any GOT relocation tests. From the x86-64 GOT test:

# Test PC-rel GOT relocation.
# Verify both the contents of the GOT entry for y, and that the movq instruction
# references the correct GOT entry address:
# rtdyld-check: *{8}(stub_addr(test_x86-64.o, __text, y)) = y
# rtdyld-check: decode_operand(insn3, 4) = stub_addr(test_x86-64.o, __text, y) - next_pc(insn3)
        movq    y at GOTPCREL(%rip), %rax

The first test is reading the value of the stub (in this case GOT entry) for y and verifying that it contains the address of y.
The second test is verifying that the PC-relative offset for the instruction is equal to the difference between the stub address and the next instruction.


> On Mar 22, 2016, at 12:58 PM, Michael Gottesman <mgottesman at> wrote:
> I am not actually reviewing this, but just as a drive by: This is definitely going to need tests.
>> On Mar 22, 2016, at 12:56 PM, Michael Gottesman via llvm-commits <llvm-commits at> wrote:
>> Lang, can you take a look at this one?
>>> On Mar 22, 2016, at 10:59 AM, William Dillon via llvm-commits <llvm-commits at> wrote:
>>> <llvm.patch>This change supports the swift interpreter on armv7-based linux machines.  This is required for a number of tests and the package manager.
>>> - Will_______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the llvm-commits mailing list