[LLVMbugs] [Bug 10128] New: ARM Thumb 2: Alignment getting lost between .ll and .s

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Jun 12 21:49:18 PDT 2011


           Summary: ARM Thumb 2: Alignment getting lost between .ll and .s
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: ARM
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: xocotl at gmail.com
                CC: llvmbugs at cs.uiuc.edu

Created an attachment (id=6731)
 --> (http://llvm.org/bugs/attachment.cgi?id=6731)
llvm code you can compile to see the problem

On this .ll file, the syntax I am using is:
llc -mcpu=cortex-m3 -filetype=asm Bad.ll
Alternatively -filetype=obj.

In any case, __node_3__locals is not being aligned.
When emitted as an ELF, it places at 0x1d in .bss.
It's a 4-byte value, so this causes a crash at runtime.
The .s file doesn't have any align directives that I
can see for the value, while the .ll file does. ELF
output has this same problem, so the bug must be before
it gets that far.

This does not occur if these variables are not internalized.
Only when declared static or when internalized for global
optimization does this occur. If the symbols are exported,
the problem isn't there. Perhaps it's some optimization that
only occurs when they are local?

This bug is causing me serious problems, so please take a
look at it.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list