[LLVMbugs] [Bug 18925] New: [MC/Mach-O], Incorrect symbol stub is chosen by assembler

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Feb 21 02:58:15 PST 2014


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

            Bug ID: 18925
           Summary: [MC/Mach-O], Incorrect symbol stub is chosen by
                    assembler
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: alexander.musman at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The following looks like a bug in clang (llvm's MC component), it chooses
incorrect symbol stub for the call instruction in the small testcase below.

> llvm-mc c2.s --filetype=obj -o=casm.o && otool -tV casm.o
casm.o:
(__TEXT,__text) section
_main:
0000000000000000        callq   0x15 ## symbol stub for: __ZTIi
0000000000000005        nopw    %cs:_main(%rax,%rax)


> cat c2.s
        .file "c.cpp"
        .section        __TEXT, __text
       .align    4
        .globl _main
_main:
        call      L___cxa_allocate_exception.stub
        .align    4
        .section __IMPORT,__jump_table,symbol_stubs,self_modifying_code,5
L___cxa_throw.stub:
        .indirect_symbol ___cxa_throw
        .byte   0xf4,0xf4,0xf4,0xf4,0xf4
.non_lazy_symbol_pointer
L__ZTIi$non_lazy_ptr:
        .indirect_symbol __ZTIi
        .long 0
        .section __IMPORT,__jump_table,symbol_stubs,self_modifying_code,5
L___cxa_allocate_exception.stub:
        .indirect_symbol ___cxa_allocate_exception
        .byte   0xf4,0xf4,0xf4,0xf4,0xf4
        .subsections_via_symbols

-- 
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/20140221/f505c112/attachment.html>


More information about the llvm-bugs mailing list