<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [MC/Mach-O], Incorrect symbol stub is chosen by assembler"
href="http://llvm.org/bugs/show_bug.cgi?id=18925">18925</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[MC/Mach-O], Incorrect symbol stub is chosen by assembler
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>alexander.musman@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>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.
<span class="quote">> llvm-mc c2.s --filetype=obj -o=casm.o && otool -tV casm.o</span >
casm.o:
(__TEXT,__text) section
_main:
0000000000000000 callq 0x15 ## symbol stub for: __ZTIi
0000000000000005 nopw %cs:_main(%rax,%rax)
<span class="quote">> cat c2.s</span >
.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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>