[llvm-commits] [PATCH] Fix R_ARM_ABS32 JIT relocation

Amara Emerson amara.emerson at arm.com
Tue Oct 2 14:58:08 PDT 2012


Thanks for the feedback. I'll make clarify the reasoning more and make the
mtriple change to the test case before we commit.

Amara

-----Original Message-----
From: Kaylor, Andrew [mailto:andrew.kaylor at intel.com] 
Sent: 02 October 2012 22:54
To: Amara Emerson; llvm-commits at cs.uiuc.edu
Subject: RE: [llvm-commits] [PATCH] Fix R_ARM_ABS32 JIT relocation

It was the specific value that I wondered about.  Your explation makes
sense.  It might be worth mentioning the value in the comment so someone
down the road doesn't change it, thinking it's a typo.  It would also
clarify the code that follows the assert.

BTW, I did commit the change that I mentioned earlier with the MCJIT tests.

-Andy

-----Original Message-----
From: Amara Emerson [mailto:Amara.Emerson at arm.com] 
Sent: Tuesday, October 02, 2012 2:42 PM
To: Kaylor, Andrew; llvm-commits at cs.uiuc.edu
Subject: RE: [llvm-commits] [PATCH] Fix R_ARM_ABS32 JIT relocation

The 0x000F0FFF is used to check that there is no implicit addend already in
the target address, if there is then we reasoned that it's better to abort
since something has gone wrong well before relocation application.

If you're asking about the specific 0x000F0FFF value, the MOVW and MOVT
instructions which use R_ARM_MOVW_ABS_NC and R_ARM_MOVT_ABS respectively
have their 16 bit immediates encoded in two, non-contiguous fields. The mask
is just checking to see if any of those bits have been set.

Thanks,
Amara

-----Original Message-----
From: Kaylor, Andrew [mailto:andrew.kaylor at intel.com]
Sent: 02 October 2012 18:52
To: Amara Emerson; llvm-commits at cs.uiuc.edu
Subject: RE: [llvm-commits] [PATCH] Fix R_ARM_ABS32 JIT relocation

Why are you using '0x000F0FFF' in the asserts?

Assuming there's a good reason for that, it looks good to me.

I've got a patch that I hope to be committing today that will require a new
parameter to the MCJIT tests (-mtriple=%mcjit_triple).  If my patch goes in
before yours, please add that.  If yours goes in first, I'll update it.

-Andy

-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu
[mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Amara Emerson
Sent: Tuesday, October 02, 2012 7:06 AM
To: llvm-commits at cs.uiuc.edu
Subject: Re: [llvm-commits] [PATCH] Fix R_ARM_ABS32 JIT relocation

Ping.

-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu
[mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Amara Emerson
Sent: 28 September 2012 13:12
To: llvm-commits at cs.uiuc.edu
Subject: [llvm-commits] [PATCH] Fix R_ARM_ABS32 JIT relocation

Hi,

The attached patch fixes the relocation of R_ARM_ABS32 relocs in the
RuntimeDyld. The implicit addend in the target relocation address was not
being used, resulting in multiple R_ARM_ABS32 relocations having the same
final value.

The patch also adds asserts to ensure that there are no unexpected addends
for MOVW/MOVT relocations.

A test case is also included in the patch which reproduces the bug.

Regards,
Amara





_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


-- IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended
recipient, please notify the sender immediately and do not disclose the
contents to any other person, use it for any purpose, or store or copy the
information in any medium.  Thank you.









More information about the llvm-commits mailing list