<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 --- - Link error 'text relocs not supported for x86_64' when using -fsanitize=function"
href="http://llvm.org/bugs/show_bug.cgi?id=17633">17633</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Link error 'text relocs not supported for x86_64' when using -fsanitize=function
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</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>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jonathan.sauer@gmx.de
</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>Created <span class=""><a href="attachment.cgi?id=11398" name="attach_11398" title="Complete log of clang run">attachment 11398</a> <a href="attachment.cgi?id=11398&action=edit" title="Complete log of clang run">[details]</a></span>
Complete log of clang run
The following code (adapted from clang's
test/CodeGenCXX/catch-undef-behavior.cpp) results in a link error with clang
r193073 on Mac OS X 10.6.8 x86_64:
void indirect_function_call(void (*p)(int))
{
p(42);
}
int main()
{
}
This results in (full log attached):
% ~/LLVM/build/Release+Asserts/bin/clang++ -stdlib=libc++ -fsanitize=function
-v clang.cpp
clang version 3.4 (trunk 193073)
Target: x86_64-apple-darwin10.8.0
[...]
ld: text relocs not supported for x86_64 in __Z22indirect_function_callPFviE
from /var/folders/RI/RI4iqAygH0OWeTzP0+rLU++++TI/-Tmp-/clang-655d62.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Is the function sanitizer intended to be unavailable on Mac OS X x86_64? (in
which case this should probably be mentioned in the documention, and the
function sanitizer should not be included in -fsanitize=undefined on that
platform)</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>