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

Jim Grosbach grosbach at apple.com
Wed May 9 10:48:29 PDT 2012


Hello,

There are some subtleties regarding which relocation to use for those fixups. Someone more familiar with ELF than I should have a look. We definitely want to get this fixed on trunk. I do agree with Bill, however, that it's unfortunately too late for 3.1, especially since the integrated assembler is off by default for ARM+ELF targets.

-Jim

On May 8, 2012, at 5:18 PM, Weiming Zhao wrote:

> Hello,
>  
> On LLVM 3.1, clang crashes when “-mthumb -mcpu=cortex-a9 –integrated-as” are specified with the following C code:
> void foo()
> {
>   exit(1);
> }
>  
> Or the asm code:
>                 .syntax unified
>                 .fpu neon
>                 .eabi_attribute 10, 3
>                 .eabi_attribute 12, 1
>                 .eabi_attribute 20, 1
>                 .eabi_attribute 21, 1
>                 .eabi_attribute 23, 3
>                 .eabi_attribute 24, 1
>                 .eabi_attribute 25, 1
>                 .file        "test_exit.c"
>                 .text
>                 .globl    foo
>                 .align     2
>                 .type     foo,%function
>                 .code     16
>                 .thumb_func
> foo:
>                 push      {r7, lr}
>                 mov       r7, sp
>                 movs     r0, #1
>                 mov       lr, pc
>                 b.w        exit
> .Ltmp0:
>                 .size       foo, .Ltmp0-foo
>  
> Bug is reported at: http://llvm.org/bugs/show_bug.cgi?id=12769
>  
> 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)
> Fix-12769.patch is the patch, which is also attached in bugzilla.
>  
> Please review it.
>  
> Thanks,
> Weiming
>  
> <fix-12769.patch><tests.tar>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120509/73e6d322/attachment.html>


More information about the llvm-commits mailing list