[LLVMbugs] [Bug 21997] New: missassembly of call to aligned local symbol

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Dec 21 00:31:18 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=21997

            Bug ID: 21997
           Summary: missassembly of call to aligned local symbol
           Product: tools
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: llvm-as
          Assignee: unassignedbugs at nondot.org
          Reporter: luddy.harrison at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 13583
  --> http://llvm.org/bugs/attachment.cgi?id=13583&action=edit
foo.s: example of bug; bar.s: fixed by moving L downstream

when .balign is applied to a local label in the text section, and that symbol
is called at a later point in the same assembly file, the assembler appears to
generate an incorrect relocation that causes a bad pc to be formed by the call.
 the result is a bus error.  the bug seems not to occur if the aligned local
symbol is downstream of
the call site.

I've attached a small test case that reproduces the behavior.  here's the
offending code:

    .globl    _main
    .text
    .balign 1<<4, 0x90
L:
    ret
_main:
    call L // gets a bad pc for L
    xorq %rax, %rax
    ret

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141221/133bdfc8/attachment.html>


More information about the llvm-bugs mailing list