[llvm-commits] Fix bug 12769 MCAssembler crashes with -mthumb -mcpu=cortex-a9

Weiming Zhao weimingz at codeaurora.org
Wed May 9 18:21:46 PDT 2012


Hi,

Attached is updated patch based on Tim's suggestion.
I also updated the bugzilla as well.
I run the test suite and unit test. No new fails.

Thanks,
Weiming

-----Original Message-----
From: Tim Northover [mailto:t.p.northover at gmail.com] 
Sent: Wednesday, May 09, 2012 11:55 AM
To: Weiming Zhao
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [llvm-commits] Fix bug 12769 MCAssembler crashes with -mthumb
-mcpu=cortex-a9

Hi Weiming,

Apologies if this gets through twice. I tried earlier but the list seems to
be eating e-mails from that address for some reason.

> This patch fixes the issue. And it also passes the test suite. For the 
> unit tests, it doesn't create new fails. (details are in tests.tar)

In this case, I believe we actually need an R_ARM_THM_JUMP24 which will put
the immediate into the correct bits for a Thumb unconditional branch. If you
look at the ARM ELF ABI and the architecture reference manual you'll see
that if a linker encountered R_ARM_THM_CALL it would put the immediate into
bits 0-11 and 16-26, stamping all over your lovingly crafted B.W
instruction.

We could also do with some tests for this specific issue: a examples for a
similar case can be found in test/MC/ARM/elf-reloc-condcall.s.

Cheers.

Tim.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-12769_2.patch
Type: application/octet-stream
Size: 895 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120509/2c697601/attachment.obj>


More information about the llvm-commits mailing list