[llvm-commits] [llvm] [Patch] MCJIT, fix ARM ELF stub relocations

Danil Malyshev dmalyshev at accesssoftek.com
Tue Apr 17 13:10:55 PDT 2012


Hi,

Committed at r154948, thank you!



Regards,

Danil


________________________________
From: Kaylor, Andrew [andrew.kaylor at intel.com]
Sent: Thursday, April 12, 2012 6:43 PM
To: Danil Malyshev
Cc: llvm-commits at cs.uiuc.edu
Subject: RE: [llvm-commits] [llvm] [Patch] MCJIT, fix ARM ELF stub relocations

OK.  That makes sense.

So in that case, I’d so the patch looks good.

-Andy

From: Danil Malyshev [mailto:dmalyshev at accesssoftek.com]
Sent: Thursday, April 12, 2012 1:03 PM
To: Kaylor, Andrew
Cc: llvm-commits at cs.uiuc.edu
Subject: RE: [llvm-commits] [llvm] [Patch] MCJIT, fix ARM ELF stub relocations

Hi Andrew,


Some ARM branch instructions use offset between current instruction and destination instruction instead of full destination address. These instructions has a short jump range, so if we have relocations for this instruction we need use a special stub function in bottom of section which a full destionation address and resolve branch relocation to this function. The offset is always the same, wherever we moved the section, so I resolve this relocation immediate and use the local address for it.



Regards,
Danil

________________________________
From: Kaylor, Andrew [andrew.kaylor at intel.com]
Sent: Tuesday, April 10, 2012 10:23 AM
To: Danil Malyshev; llvm-commits at cs.uiuc.edu<mailto:llvm-commits at cs.uiuc.edu>
Subject: RE: [llvm-commits] [llvm] [Patch] MCJIT, fix ARM ELF stub relocations
It appears to me that this will result in the FinalAddress parameter being calculated from Section.Address.  Shouldn’t it be calculated from Section.LoadAddress?  That is, rather than passing ‘Target’ should you be passing ‘Section.LoadAddress + Rel.Offset’?

It is my understanding that in the case of local execution Section.Address and Section.LoadAddress will be the same (and so existing tests would pass with the patch you submitted), but that the distinction exists to handle the case of remote JITing.  I think that we may have some clean-up to do to make this work correctly, but it looks like the foundation is more or less in place.

Let me know if I’ve misunderstood this in some way.

-Andy


From: llvm-commits-bounces at cs.uiuc.edu<mailto:llvm-commits-bounces at cs.uiuc.edu> [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Danil Malyshev
Sent: Friday, April 06, 2012 5:49 PM
To: llvm-commits at cs.uiuc.edu<mailto:llvm-commits at cs.uiuc.edu>
Subject: [llvm-commits] [llvm] [Patch] MCJIT, fix ARM ELF stub relocations

Hello everyone,


Attached the patch fixed ARM stub relocations in RuntimeDyldELF.


Regards,
Danil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120417/7559f61b/attachment.html>


More information about the llvm-commits mailing list