<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 --- - bad relocation (unknown type) linking Mach-O on OS X to crt1.o"
href="http://llvm.org/bugs/show_bug.cgi?id=21090">21090</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>bad relocation (unknown type) linking Mach-O on OS X to crt1.o
</td>
</tr>
<tr>
<th>Product</th>
<td>lld
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>release blocker
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>alexchandel@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>Linking a dummy object file with only 1 symbol, _main, using the command:
`lld -flavor darwin /usr/lib/crt1.o /usr/lib/libSystem.B.dylib test.o`
produces the following error:
`Cannot open /usr/lib/crt1.o: bad relocation (unknown type) in section
__TEXT/__text (r_address=0, r_type=0, r_extern=0, r_length=0, r_pcrel=0,
r_symbolnum=0)`
crt1.o is a fat Mach-O binary:
```
$ file /usr/lib/crt1.o
/usr/lib/crt1.o: Mach-O universal binary with 2 architectures
/usr/lib/crt1.o (for architecture x86_64): Mach-O 64-bit object x86_64
/usr/lib/crt1.o (for architecture i386): Mach-O object i386
```</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>